Closed Bug 601458 Opened 10 years ago Closed 10 years ago

Restoring Add-on Manager tab in combination with Adblock Plus and Addons Manager Hilite breaks many browser components


(Toolkit :: Add-ons Manager, defect)

Windows 7
Not set



Tracking Status
blocking2.0 --- betaN+


(Reporter: ecfbugzilla, Unassigned)



(Keywords: regression)


(1 file)

Attached image Screenshot
This is a very weird issue and I am all but sure that the add-on manager is at fault here. Here are the steps to reproduce:

1. Install Addons Manager Highlite 0.5 from, restart your browser.
2. Install Adblock Plus 1.2.2 from, restart browser from the add-on manager tab so that it is restored on startup.

Expected results:

Add-on manager tab is restored, shows all installed extensions correctly and the browser functions as usual.

Actual results:

Add-on manager tab is restored but fails to initialize properly (see attached screenshot). Error console shows the following error in XPIProvider.jsm several times:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: resource://gre/modules/XPIProvider.jsm :: anonymous :: line 5347"  data: no]

This line is responsible for getting the blocklist service. Other error messages indicate that the browser suddenly forgot the meaning of the let keyword:

Error: missing ; after for-loop initializer
Source File: jar:file:///C:/Program%20Files%20(x86)/firefox/omni.jar!/components/nsMicrosummaryService.js
Line: 182, Column: 13
Source Code:
    for (let i = 0; i < this._bookmarks.length; i++) {

Error: missing ; after for-loop initializer
Source File: jar:file:///C:/Program%20Files%20(x86)/firefox/omni.jar!/components/nsLivemarkService.js
Line: 132, Column: 11
Source Code:
  for (let i = 0; i < livemarks.length; i++) {

Error: missing ; before statement
Source File: resource://services-sync/main.js
Line: 39, Column: 4
Source Code:
let Weave = {};

Error: missing ; before statement
Source File: resource://gre/modules/DownloadTaskbarProgress.jsm
Line: 39, Column: 4
Source Code:

Error: missing ; before statement
Source File: resource://gre/modules/PlacesDBUtils.jsm
Line: 47, Column: 4
Source Code:
let EXPORTED_SYMBOLS = [ "PlacesDBUtils" ];

Error: missing ; before statement
Source File: jar:file:///C:/Program%20Files%20(x86)/firefox/omni.jar!/components/nsPlacesAutoComplete.js
Line: 175, Column: 8
Source Code:
    let callback = this._callback;

A bunch of other services seem to be broken as well, e.g. prompt service. This all goes away after browser restart, at least if the add-ons manager tab isn't restored.

My analysis of Addons Manager Highlite:
* It registers a browser window overlay, loading aolhilite.js script.
* Waits for the browser window to load, registers "chrome-document-global-created" observer then.
* When "chrome-document-global-created" is triggered for "about:addons" window it waits for this window to load.
* In the load event handler it does some DOM attribute manipulations, then calls AddonManager.getAddonsByTypes.
* In AddonManager.getAddonsByTypes callback the following line triggers the issue:

    head.insertBefore(extList, hiliteButton);

I see no reason why any of this should cause such issues.

I'm not yet sure what Adblock Plus has to do with all this, it doesn't touch the add-on manager tab.

I reproduced this issue in Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20101001 Firefox/4.0b7pre. The original reporter used Windows XP so this should affect at least all Windows versions.
In Adblock Plus the problem seems to be adding a content policy - if I don't add a content policy the issue goes away, if nsIContentPolicy.shouldLoad() returns ACCEPT immediately the issue is still there. Which leaves me wondering why my minimal content policy extension (which does exactly the same) doesn't have the same effect - some kind of timing issue?
This regressed between 2010-09-14 and 2010-09-15, regression range:
Keywords: regression
Robert, could this be caused by your Tracemonkey merges in
blocking2.0: --- → final+
I am the author of Addons Manager Hilite. rob4rock, who originally reported this bug to me, has confirmed that my updated Addons Manager Hilite version 0.5.1 does not exhibit this bug. See:
Version 0.5.1 is now available at:

That seems to indicate that it is indeed timing-related. Either this is a Mozilla bug or my code was incorrect. If the problem was with my code, then it appears that there are limitations on what should be done from the callback function mentioned in comment 0; if so, they should be documented.
So it seems to be similar to what we have seen with Mozmill on bug 600657.
We've seen this kind of thing before when the JS engine accidentally starts executing code with the wrong JS version, I think I've heard of this happening recently too, is this just a jaegermonkey merge bustage?

Rob you marked this as blocking final, does that mean you know something about it or want to investigate it from the JS side?
Depends on: 596580
blocking2.0: final+ → betaN+
Don't know if another example would be helpful, but my Stay-Open Menu extension is also plagued with this issue. Tested with 1.5.6b2 from
Happens on a clean profile with no other extensions installed.  Only occurs if there is more than one tab open and you restart from the Add-ons Manager tab. Extension claims it is disabled on restart, error console shows multiple uncaught exceptions and 'missing ;' entries. Leaves the browser in a state where bookmark folders don't open when clicked, and clicking the 'bookmarks star' gives a flash of yellow but no ability to actually save a bookmark.

Also see:
where KWeirso reports problems with the 'let' keyword. (I PM'd him and he is not using either of my extensions.)
Whiteboard: [needs 596580]
Can someone verify if this is fixed?
Whiteboard: [needs 596580]
Not noticed any issues and no longer any "missing ;" errors, when tested on a recent nightly, so I'd say yes, it's fixed, thanks.
Thanks. So lets this mark as WFM. Feel free to reopen if it reappears.
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.