Closed Bug 842618 Opened 12 years ago Closed 12 years ago

SeaMonkey contains PrivateBrowsingUtils.jsm, but it throws an exception if used

Categories

(SeaMonkey :: Preferences, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.19

People

(Reporter: morac, Assigned: philip.chee)

References

Details

Attachments

(2 files)

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
Component: General → Preferences
This pref adds the "browser.privatebrowsing.autostart" pref to our browser-prefs.js for extension-compat
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #717525 - Flags: review?(neil)
Attachment #717525 - Flags: review?(iann_bugzilla)
Attachment #717525 - Flags: review?(iann_bugzilla) → review+
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: 12 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
Attachment #717525 - Flags: review?(neil)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: