Closed Bug 1334945 Opened 8 years ago Closed 5 years ago

When both privacy.clearOnShutdown.openWindows and privacy.sanitize.sanitizeOnShutdown are set to true, Firefox will launch 2 windows in all subsequent launches.

Categories

(Toolkit :: Data Sanitization, defect, P3)

51 Branch
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox-esr68 --- fixed
firefox68 --- fixed
firefox69 --- fixed
firefox70 --- fixed

People

(Reporter: garycheng12, Assigned: johannh)

References

Details

(Whiteboard: [fixed by bug 1554167])

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131

Steps to reproduce:

1. Firefox instances are closed. 
2. Set both `privacy.clearOnShutdown.openWindows` and `privacy.sanitize.sanitizeOnShutdown` to true in mozilla.cfg. 
3. Launch Firefox.


Actual results:

Firefox launches 2 windows every time.


Expected results:

Firefox should only launch 1 window when a single instance is launched.
Component: Untriaged → Private Browsing
Confirming bug still exists on FF 53.0.3.

It was very annoying to locate, since this had gotten set in my profile it kept causing two windows to open and I couldn't get it fixed without resetting my whole profile.
Confirmed on FF 59. Marking P3 for backlog.
Priority: -- → P3

Confirmed on FF 60.6.2esr

Vanilla Firefox profiles used. Options: custom settings for history, clear on shutdown (i.e privacy.sanitize.sanitizeOnShutdown = true), every option is ticked. Also with Ctrl-Shift-Del, every option is ticked, and set for all time.

Test1: privacy.clearOnShutdown.openWindows = true

  • Windows:
    • ESR60, FF60-66: problem still persists: for me the first window opens and closes as a second replaces it
    • FF67-70: the problem no longer exists
  • Linux (Mint)
    • ESR60, FF68: no such problem seems to exist

Test2: privacy.cpd.openWindows = true

  • note: I reset privacy.clearOnShutdown.openWindows to default false
  • Windows
    • ESR60, FF60-70: open browser, open about:config, set pref to true, run ctrl-shift-del and clear everything, a second window opens
  • Linux (Mint)
    • ESR60, FF68: same problem

Conclusions:

  • This issue (privacy.clearOnShutdown) has been fixed since FF67 (assuming that Mac returns the same result)
  • The issue is not fixed when using manual sanitizing (privacy.cpd), so whatever was done in FF67, could also be applied here: just re-title the ticket and re-purpose it

somewhere about here, I think: https://dxr.mozilla.org/mozilla-central/source/browser/modules/Sanitizer.jsm#561

  let refObj = {};
  TelemetryStopwatch.start("FX_SANITIZE_OPENWINDOWS", refObj);

  // First create a new window. We do this first so that on non-mac, we don't
  // accidentally close the app by closing all the windows.

I tested with browser.tabs.closeWindowWithLastTab default true, and false: no difference

I had a quick look at 67 resolved bugs and Bug 1554167 looks like the most likely (to have inadvertently fixed the privacy.clearOnShutdown.openWindows issue) - that bug removed a "shutdown sanitization would be left dangling and run again on next startup" which seems to fit with openWindows sanitizing opening a new window.

PS: Johann, sorry for the needinfo, but I'm not sure who else to ping

Flags: needinfo?(jhofmann)

Sounds very likely, yes. Thank you.

Assignee: nobody → jhofmann
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Depends on: 1554167
Flags: needinfo?(jhofmann)
Resolution: --- → FIXED
Whiteboard: [fixed by bug 1554167]
Component: Private Browsing → Data Sanitization
Product: Firefox → Toolkit

Sorry johann, my bad. I guess you only read my last post: but it was the two I made before it that I really wanted you to look at. Should I just open a new bugzilla? i.e when sanitizing manually with ctrl-shift-del, if privacy.cpd.openWindows = true, it causes a second window to open

Flags: needinfo?(jhofmann)

I'll open a new ticket, since it's a different pref and doesn't rely on sanitizing on shutdown as per this issue's title. It's an edge case (in your forest: sorry for "mangling the metaphors"), and not something I personally am worried about.

Flags: needinfo?(jhofmann)

Ah, I see, sorry for that and thanks for opening the new bug, I think that makes things clearer.

You need to log in before you can comment on or make changes to this bug.