Closed
Bug 702556
Opened 13 years ago
Closed 13 years ago
JS exception "aTabs[0].linkedBrowser is null" in nsSessionStore.js
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 11
People
(Reporter: heycam, Assigned: zpao)
References
Details
Attachments
(1 file)
1.41 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
During a few browser chrome mochitests, we get messages like the following in the log: TEST-INFO | chrome://mochitests/content/browser/browser/components/sessionstore/test/browser/browser_588426.js | Console message: [JavaScript Error: "aTabs[0].linkedBrowser is null" {file: "resource:///components/nsSessionStore.js" line: 2982}] (This is currently not reported as a test failure, although some local patches I have cause it to be.)
Assignee | ||
Comment 1•13 years ago
|
||
I see what the problem is there... Fallout from changing the way we store some data. In this case __SS_tabStillLoading is now on the tab's browser instead of put into tabData so we're checking a less safe place (which in this case doesn't exist).
Blocks: 698565
Assignee | ||
Comment 2•13 years ago
|
||
I think I got that logic right...
Assignee: nobody → paul
Attachment #574745 -
Flags: review?(dietrich)
Reporter | ||
Comment 3•13 years ago
|
||
Confirmed in https://tbpl.mozilla.org/?tree=Try&rev=f031662ebeb9 that this avoids the JS error.
Comment 4•13 years ago
|
||
Comment on attachment 574745 [details] [diff] [review] Patch v0.1 Review of attachment 574745 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/sessionstore/src/nsSessionStore.js @@ +2982,5 @@ > function sss_restoreHistory(aWindow, aTabs, aTabData, aIdMap, aDocIdentMap) { > var _this = this; > + // if the tab got removed before being completely restored, then skip it > + while (aTabs.length > 0 && (!aTabs[0].parentNode || !aTabs[0].linkedBrowser || > + !aTabs[0].linkedBrowser.__SS_tabStillLoading)) { can you bust this out into a isFullyRestored (or whatever it makes sense to call it) helper? that would be far more explicit and readable. r=me with that change.
Attachment #574745 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 5•13 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/b71dae458e87
Whiteboard: [fixed-in-fx-team]
Comment 6•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b71dae458e87
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 11
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•