Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two windows are opened due to privacy.clearOnShutdown.openWindows #288

Closed
emberfade opened this issue May 3, 2017 · 6 comments
Closed

Comments

@emberfade
Copy link

emberfade commented May 3, 2017

  • privacy.clearOnShutdown.openWindows, true
  • privacy.sanitize.sanitizeOnShutdown, true

When both of those are set it causes Firefox to open two windows upon the second time firefox is launched. It happens on Arch Linux and Ubuntu for me.

There seems to be a bug report about it: https://bugzilla.mozilla.org/show_bug.cgi?id=1334945
and arkenfox/user.js/issues/99

Even when I revert privacy.clearOnShutdown.openWindows I have to delete prefs.js to actually fix this problem. Otherwise it keeps on opening two windows for me.

@Gitoffthelawn
Copy link
Contributor

Weird you have to delete prefs.js. That shouldn't be.

@emberfade
Copy link
Author

My bad, you're right I don't have to delete prefs.js. I always forget that settings in user.js are written into prefs.js and therefore deleting an entry in user.js doesn't undo it.

@nodiscc
Copy link
Contributor

nodiscc commented May 4, 2017

Hello, this pref was introduced in https://hg.mozilla.org/mozilla-central/rev/dbd49d378c9b; along with privacy.cpd.openWindows.

These prefs actually seem to be legacy IMO

Even though there is no Open windows entry in the Clear Private Data dialog, the open windows clearing logic is still present in the current sanitize.js, and the prefs are still present in the lastest Firefox revision.

I will send a path to add // NOTICE: Clearing open windows on Firefox exit causes https://bugzilla.mozilla.org/show_bug.cgi?id=1334945 (2 windows are opened on Firefox start) next to that pref until the bugzilla ticket is fixed.

Ref #231

@Thorin-Oakenpants
Copy link

@nodiscc as I said in arkenfox/user.js#45 where I went through the code that is still present

@nodiscc
Copy link
Contributor

nodiscc commented May 5, 2017

These prefs actually seem to be legacy IMO
arkenfox/user.js#45 where I went through the code that is still present
privacy.clearOnShutdown.openWindows (2803a) is not used

You seem to imply that the value of this pref is not used anywhere in Firefox, but it is seems it is: https://dxr.mozilla.org/mozilla-esr45/source/browser/base/content/sanitize.js#77

let openWindowsIndex = itemsToClear.indexOf("openWindows");
let cookiesIndex = itemsToClear.indexOf("cookies");
...

@Thorin-Oakenpants
Copy link

Thorin-Oakenpants commented May 5, 2017

That's not what I said. I said it is legacy (IMO). I went thru that code, all of it. Of course it is still in there, that's what legacy means. The point is it does nothing AFAIK in terms of clearing anything extra - think about it for a minute, you are shutting down or clearing data via CPD - it already clears all open windows. It has been suggested this was for controlling some session store, but I cannot find any evidence of that.

The settings obviously do something because it triggers dual windows, but it does nothing to clear any additional data and to the best of my knowledge is a left-over relic -> legacy

Maybe my definition of "legacy" is all screwed up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants