Closed Bug 823683 Opened 13 years ago Closed 13 years ago

PrivateBrowsingUtils.isWindowPrivate returns incorrect value when changing browser.privatebrowsing.autostart preference

Categories

(Firefox :: Private Browsing, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 801823

People

(Reporter: morac, Unassigned)

References

Details

When the value of browser.privatebrowsing.autostart is changed, a call to PrivateBrowsingUtils.isWindowPrivate for that window will return whatever value browser.privatebrowsing.autostart was changed to, despite the privacy state of the window not changing. For example, if the window is not private and the user changes the options to never remember history (which sets browser.privatebrowsing.autostart to true), then calls to PrivateBrowsingUtils.isWindowPrivate for that window will return true, but the window's UI will indicate it is not a private window and user data (cookies, session, etc) are still saved. Basically PrivateBrowsingUtils.isWindowPrivate is lying at that point. I'm not sure what's supposed to happen here, but if the window isn't supposed to change privacy modes, then PrivateBrowsingUtils.isWindowPrivate should return the original value.
Which Firefox version are you seeing this behavior on? This should work fine in Nightly...
Note that I cannot reproduce this in Nightly.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Based on the second paragraph in comment 0, I believe what you're seeing is in fact a valid bug, but over in bug 801823 we will be removing support for toggling the value of this pref at runtime. If that is why you filed this bug, we can just close this since we don't need to track this in two places.
Depends on: 801823
When you say toggling "at runtime", do you mean simply preventing browser.privatebrowsing.autostart from being changed until restart? As it is now, toggling that preference, either through the options menu or manually from about:config, results in the returned isWindowPrivate value being incorrect for all currently opened windows (unless they match the new setting). If the browser.privatebrowsing.autostart preference is being removed, then I agree we don't need this bug. Otherwise if it gets changed weird things will happen until all the existing windows are closed and reopened.
We're going to require the browser to restart immediately after changing the pref, or we'll revert the change.
Ah okay then. If you do that, then this won't be an issue. Feel free to close or whatever you want to do to this bug then.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
I don't think bug 729865 is the correct bug to dupe this to as that is a UI meta bug. This is a problem with changing preferences.
Sorry, you're right, this should be a dupe of bug 801823.
You need to log in before you can comment on or make changes to this bug.