Closed
Bug 589962
Opened 15 years ago
Closed 15 years ago
Sync UI: gBrowser is not defined
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| blocking2.0 | --- | final+ |
People
(Reporter: zpao, Assigned: philikon)
Details
(Whiteboard: [sync-ui-followup])
Attachments
(1 file)
|
1016 bytes,
patch
|
Gavin
:
review+
Gavin
:
approval2.0+
|
Details | Diff | Splinter Review |
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "'[JavaScript Error: "gBrowser is not defined" {file: "chrome://browser/content/browser.js" line: 3910}]' when calling method: [nsIObserver::observe]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource://services-sync/ext/Observers.js :: anonymous :: line 122" data: yes]
************************************************************
I've seen this a couple times before (and have heard of others see it), but had never figured out how to reproduce it, until now.
STR:
1. Start up Firefox,
2. Open a 2nd window
3. Close a window
4. Wait for error
The error is at http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-syncui.js#60 and it's happening because the observer that was added in gSyncUI.init for that window is being notified. But the window doesn't exist anymore, so gBrowser isn't defined :(
Can fix this by removing the observer when the window closes (either with an unload listener or a domwindowclosed observer). Or maybe just try/catch & return from the catch.
| Reporter | ||
Comment 1•15 years ago
|
||
blocking2.0? because we shouldn't do these things in a release...
blocking2.0: --- → ?
| Assignee | ||
Comment 2•15 years ago
|
||
Remove observer when window is unloaded
Assignee: nobody → philipp
Attachment #468514 -
Flags: review?(gavin.sharp)
Updated•15 years ago
|
Attachment #468514 -
Flags: review?(gavin.sharp) → review+
Updated•15 years ago
|
Attachment #468514 -
Flags: approval2.0+
Updated•15 years ago
|
blocking2.0: ? → final+
| Assignee | ||
Comment 3•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•14 years ago
|
||
I'm still getting this error in Firefox 4.
Comment 5•14 years ago
|
||
Are you sure what you see is this specific bug and not caused by some other add-on, could you try temporarily disabling all add-ons and see if it still happens?
I don't see any error here.
Comment 6•14 years ago
|
||
Thanks for the tip. Disabling and then re-enabling my Firefox 4 addons seems to have resolved the issue, bizarrely. Is this expected behaviour?
Comment 7•14 years ago
|
||
No, it's not expected but it's possible that some add-on was somehow using broken preferences and re-enabling it fixed that problem, or such. Btw it's clearly not this bug and add-ons fault.
You need to log in
before you can comment on or make changes to this bug.
Description
•