Closed
Bug 1006379
Opened 11 years ago
Closed 11 years ago
JS error in language detection code when closing a tab that's still loading
Categories
(Firefox :: Translations, defect)
Firefox
Translations
Tracking
()
VERIFIED
FIXED
Firefox 32
People
(Reporter: florian, Assigned: Gijs)
Details
(Whiteboard: [translation] p=3 s=it-32c-31a-30b.2 [qa-])
Attachments
(2 files, 1 obsolete file)
|
2.57 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.53 KB,
patch
|
Felipe
:
review+
|
Details | Diff | Splinter Review |
[Exception... "[JavaScript Error: "content is null" {file: "chrome://browser/content/content.js" line: 413}]'[JavaScript Error: "content is null" {file: "chrome://browser/content/content.js" line: 413}]' when calling method: [nsIWebProgressListener::onStateChange]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://browser/content/tabbrowser.xml :: _endRemoveTab :: line 2071" data: yes]
Line 413 is:
encoder.init(content.document, "text/plain", encoder.SkipInvisibleContent);
I noticed this JS error in my terminal when I closed a tab that was still loading.
I guess it would be trivial to just add a null check on "content" and return early if it's null, but looking at the values of the parameters given to the onStateChange method may be a better solution.
| Reporter | ||
Comment 1•11 years ago
|
||
Mass move of translation bugs to the new Translation component.
Component: General → Translation
Version: Trunk → unspecified
Updated•11 years ago
|
Flags: firefox-backlog+
Whiteboard: [translation] → [translation] p=0
Updated•11 years ago
|
Whiteboard: [translation] p=0 → [translation] p=3
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Updated•11 years ago
|
Whiteboard: [translation] p=3 → [translation] p=3 s=it-32c-31a-30b.2 [qa?]
Updated•11 years ago
|
Whiteboard: [translation] p=3 s=it-32c-31a-30b.2 [qa?] → [translation] p=3 s=it-32c-31a-30b.2 [qa-]
| Assignee | ||
Comment 2•11 years ago
|
||
AFAICT the only information we have is if the load aborted. So we can do this, but it'd break translation of pages where the user hits stop/escape or aborts the load for some other reason.
Attachment #8423099 -
Flags: review?(felipc)
| Assignee | ||
Comment 3•11 years ago
|
||
Ergh, turns out Cr isn't defined yet. Fixing that.
Attachment #8423100 -
Flags: review?(felipc)
| Assignee | ||
Updated•11 years ago
|
Attachment #8423099 -
Attachment is obsolete: true
Attachment #8423099 -
Flags: review?(felipc)
| Reporter | ||
Comment 4•11 years ago
|
||
Comment on attachment 8423100 [details] [diff] [review]
don't attempt language detection on aborted page loads,
This attachment will conflict with attachment 8420802 [details] [diff] [review].
| Assignee | ||
Comment 5•11 years ago
|
||
Alternatively, we could just nullcheck.
Attachment #8423123 -
Flags: review?(felipc)
Updated•11 years ago
|
Attachment #8423100 -
Flags: review?(felipc)
Comment 6•11 years ago
|
||
Comment on attachment 8423123 [details] [diff] [review]
don't attempt language detection if the document is gone,
Review of attachment 8423123 [details] [diff] [review]:
-----------------------------------------------------------------
I think detecting the language when the user has pressed Stop is a valid use case, so let's go with this option..
Do we get the same NS_BINDING_ABORTED for both a user-triggered stop and for a document-is-gone stop?
Attachment #8423123 -
Flags: review?(felipc) → review+
| Assignee | ||
Comment 7•11 years ago
|
||
(In reply to :Felipe Gomes from comment #6)
> Comment on attachment 8423123 [details] [diff] [review]
> don't attempt language detection if the document is gone,
>
> Review of attachment 8423123 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I think detecting the language when the user has pressed Stop is a valid use
> case, so let's go with this option..
>
> Do we get the same NS_BINDING_ABORTED for both a user-triggered stop and for
> a document-is-gone stop?
Yes, AFAICT there's no way to distinguish the two cases from the web progress listener's pov. :-\
(I did also test and the other patch does indeed break the "press stop during page load, then translate" usecase)
| Assignee | ||
Comment 8•11 years ago
|
||
Whiteboard: [translation] p=3 s=it-32c-31a-30b.2 [qa-] → [translation][fixed-in-fx-team] p=3 s=it-32c-31a-30b.2 [qa-]
Comment 9•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [translation][fixed-in-fx-team] p=3 s=it-32c-31a-30b.2 [qa-] → [translation] p=3 s=it-32c-31a-30b.2 [qa-]
Target Milestone: --- → Firefox 32
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•