Closed Bug 1122204 Opened 10 years ago Closed 10 years ago

Disabling dom.indexedDB.enabled preference breaks bootstrapped add-ons


(Toolkit :: Add-ons Manager, defect)

Windows 7
Not set





(Reporter: jwkbugzilla, Unassigned)



(Keywords: regression)

This report is based on a complaint by an Adblock Plus user using JonDoFox, this preconfiguration has indexedDB disabled by default for "privacy reasons". Steps to reproduce:

1. Create a new Firefox profile.
2. Go to about:config and set dom.indexedDB.enabled to false.
3. Try to install Adblock Plus.

Expected results:
Adblock Plus installs correctly.

Actual results:
Error message "There was an error installing Adblock Plus" is shown. After a restart the extension is displayed in the Add-ons Manager but is dysfunctional. Any attempt to update or reinstall will trigger another error message.

Error Console shows NS_ERROR_XPC_UNEXPECTED being triggered by sandbox creation in XPIProvider.jsm. I reduced it to the following code:

>  var principal = Cc[";1"].createInstance(Ci.nsIPrincipal);
>  new Cu.Sandbox(principal, {
>    wantGlobalProperties: ["indexedDB"]
>  });

This requires indexedDB to be enabled, otherwise it will throw (regression from bug 832883).

Reproduced in Firefox 35.0 and Firefox 37.0a1 (2015-01-12) nightly on Windows. For some reason, I was unable to reproduce this issue on OS X.
Looks like this was resolved in bug 1079355 already. Makes sense then that I couldn't reproduce on OS X - my nightly was slightly newer there.
Closed: 10 years ago
Resolution: --- → DUPLICATE
Thanks for digging into this though, other people have filed this with less detail... too bad I didn't find time to work on that thing sooner. :-\

I'll see if we can get it uplifted to 36; it's not a particularly tricky patch.
So I don't forget to do this tomorrow.
Flags: needinfo?(gijskruitbosch+bugs)
So I've asked for beta uplift... but just so I understand this better, do you know why this is hitting people in 35 when it wasn't a problem in 34? Both the wanting indexeddb and bug 832883 landed well before 35. There is ample evidence this is "new" in 35, so I don't disbelieve that, but I'd feel better if I understood exactly what broke it.
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(trev.moz)
No, I have no idea why we are getting these reports now. However, this issue isn't reproducible every time - the JonDoFox profile I mentioned above works correctly initially, things only break when I try to update Adblock Plus. Also, disabling NoScript in that profile makes Adblock Plus work again, and it continues to work even after I switch NoScript on again. This doesn't make much sense given the code I've seen, the sandbox has to be created on each startup.

My guess is that there is a race condition here, there is probably something creating an indexed database manager regardless of whether that setting is switched on or off. Once that instance is created however, it can be used for the sandboxes. As usually, things start getting weird then when the initialization order changes - meaning that a classic extension is enabled/disabled or a browser update is installed.

Note that we always get plenty of reports about Adblock Plus being dysfunctional, after each and every Firefox update. This is the first time we were able to find an issue that might be responsible, I'm trying to ask people whether they indeed disabled indexedDB.
Flags: needinfo?(trev.moz)
You need to log in before you can comment on or make changes to this bug.