Bug 1062631 - Watch out for dead object proxies in gXPInstallObserver. r=Gijs

In browser_navigateaway2.js we end up with an XPCWrappedJS double-wrapped
DeadObjectProxy here, which triggers an exception when it's inserted into
the WeakMap.
This commit is contained in:
Bobby Holley 2014-09-08 13:36:21 -07:00
parent e48ac06488
commit 12db66b51b

View File

@ -44,8 +44,11 @@ const gXPInstallObserver = {
} catch (e) {
browser = winOrBrowser;
}
if (!browser)
// Note that the above try/catch will pass through dead object proxies and
// other degenerate objects. Make sure the browser is bonafide.
if (!browser || gBrowser.browsers.indexOf(browser) == -1)
return;
const anchorID = "addons-notification-icon";
var messageString, action;
var brandShortName = brandBundle.getString("brandShortName");