Closed Bug 698662 Opened 14 years ago Closed 13 years ago

error in console: this._stringBundle is undefined

Categories

(Firefox :: Sync, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 636947

People

(Reporter: dietrich, Assigned: nigelb)

Details

(Keywords: regression)

Attachments

(1 file)

points to this line in browser.js: onSyncFinish: function SUI_onSyncFinish() { let title = this._stringBundle.GetStringFromName("error.sync.title");
Are you able to reproduce this, Dietrich? What were you doing around the time that this happened? _stringBundle is just a lazy getter for return Cc["@mozilla.org/intl/stringbundle;1"]. getService(Ci.nsIStringBundleService). createBundle("chrome://weave/locale/services/sync.properties");
More info: First there are a bunch of these in the console: Error: gBrowser is not defined Source File: chrome://browser/content/browser.js Line: 3277 Which is from: // Functions called by observers onActivityStart: function SUI_onActivityStart() { if (!gBrowser) Then I see a bunch of these: Error: this._stringBundle is undefined Source File: chrome://browser/content/browser.js Line: 3446 I was doing nothing this time. Laptop was idle. I sat down and opened the console, and this is what I saw.
OS X I presume? This is probably the hidden window receiving notifications. I bet we're not guarding against !gBrowser everywhere.
(In reply to Philipp von Weitershausen [:philikon] from comment #3) > OS X I presume? yessir
Magic 8-ball of responsibility says Ally.
Assignee: nobody → ally
Keywords: regression
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Attached patch patch-v1Splinter Review
Patch v1. I still haven't figured how to actually get this traceback, but this should fix the wrong if(gBrowser) and if(!gBrowser) checks throughout browser-syncui.js.
Assignee: ally → nigelbabu
Status: NEW → ASSIGNED
Attachment #578693 - Flags: feedback?(ally)
Attachment #578693 - Flags: feedback?(ally) → review?(mconnor)
Comment on attachment 578693 [details] [diff] [review] patch-v1 I don't think this patch actually addresses the problem. I believe the underlying problem is not checking for "if (!gBrowser)" in every callback. For example: >onSyncFinish: function SUI_onSyncFinish() { > let title = this._stringBundle.GetStringFromName("error.sync.title"); We should bail if we don't have gBrowser defined. e.g. > if (!gBrowser) { > return; > } > > let title = this._stringBundle... This file is effectively concatenated to a larger file, so the GLOBAL_SCOPE workaround is not necessary.
Attachment #578693 - Flags: review?(mconnor) → review-
My comment in the previous comment regarding the GLOBAL_SCOPE workaround isn't correct. We are seeing errors when checking gBrowser. This confounds both rnewman and myself, as gBrowser should always be in scope. No other browser-*.js file seems to conditionally check for gBrowser. We must be binding to a different scope somewhere or something.
(In reply to Gregory Szorc [:gps] from comment #8) > My comment in the previous comment regarding the GLOBAL_SCOPE workaround > isn't correct. We are seeing errors when checking gBrowser. This confounds > both rnewman and myself, as gBrowser should always be in scope. No other > browser-*.js file seems to conditionally check for gBrowser. We must be > binding to a different scope somewhere or something. This is most likely a lingering observer. The whole window has been garbage collected, including its scope, but the observer hasn't. So looking up stuff in the scope, like `gBrowser`, will fail. Happy hunting! :/
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Component: Firefox Sync: UI → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: