Closed Bug 842618 Opened 8 years ago Closed 8 years ago
Monkey contains Private Browsing Utils .jsm, but it throws an exception if used
The trunk (2.18a1 branch) version of SeaMonkey added the resource://gre/modules/PrivateBrowsingUtils.jsm, but because SeaMonkey doesn't support Private Browsing, referencing PrivateBrowsingUtils.permanentPrivateBrowsing throws the following exception: Tue Feb 19 2013 11:58:51 Error: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref] Source file: resource://gre/modules/PrivateBrowsingUtils.jsm Line: 31 since the browser.privatebrowsing.autostart preference does not exist in SeaMonkey. My add-on assumes that if PrivateBrowsingUtils.jsm exists, then it works. As such it is not broken in the nightly SeaMonkey loads until I add try/catches around all calls to PrivateBrowsingUtils.jsm. If Private Browsing isn't supported, SeaMonkey should not include the PrivateBrowsingUtils.jsm module.
> The trunk (2.18a1 branch) version of SeaMonkey added the resource://gre/modules > /PrivateBrowsingUtils.jsm, but because SeaMonkey doesn't support Private Browsing, > referencing PrivateBrowsingUtils.permanentPrivateBrowsing throws the following > exception: Experimental private browsing was checked in to comm-central about three or four days ago so per window Private Browsing is supported. We could of course add "pref("browser.privatebrowsing.autostart", false);" to our browser-prefs.js
OS: Windows XP → All
Hardware: x86 → All
This pref adds the "browser.privatebrowsing.autostart" pref to our browser-prefs.js for extension-compat
Pushed to comm-central: http://hg.mozilla.org/comm-central/rev/ddd02164f9f7
Target Milestone: --- → seamonkey2.19
Michael; Just to note that with this patch PrivateBrowsingUtils won't throw. But nothing in SeaMonkey ever sets this to true.
(In reply to Philip Chee from comment #4) > Michael; Just to note that with this patch PrivateBrowsingUtils won't throw. > But nothing in SeaMonkey ever sets this to true. That's fine.
(In reply to Philip Chee from comment #4) > Michael; Just to note that with this patch PrivateBrowsingUtils won't throw. > But nothing in SeaMonkey ever sets this to true. And if someone does set it to true then SeaMonkey will probably stop working properly.
Note bug 845341. It was a bug in the toolkit code to assume this pref always exists.
Note to self: Back out this patch once Bug 845341 is fixed [PrivateBrowsingUtils.permanentPrivateBrowsing can throw if the autostart pref does not exist]
Depends on: 845341
Now that Bug 845341 is fixed this can be backed out. Backout changeset: http://hg.mozilla.org/comm-central/rev/8b8ff0fc1c16
Attachment #718969 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment on attachment 717525 [details] [diff] [review] Patch v1.0 add browser.privatebrowsing.autostart to browser-prefs.js Cancelling review request
You need to log in before you can comment on or make changes to this bug.