Allow new tabs to be added to the session store during shutdown

RESOLVED FIXED in Firefox 53

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: JanH, Assigned: JanH)

Tracking

53 Branch
Firefox 53
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

Followup from bug 1266594:

In order to reliably clear history etc. when requested, shutdown of the UI is now slightly (or not so slightly, if sanitizing takes longer than expected on a slow/busy/... device) delayed when compared to the start of Gecko shutdown. This means that there is a period where the UI will still handle new tabs (e.g. incoming intents from external apps) normally, however Gecko is already busy shutting down and will not save them in the session store with the current shutdown logic.
So what had totally slipped off my radar was that obviously the Gecko browser window is closing more or less together with "application-quit" and the session store won't collect data from closed windows. I don't feel confident messing around with that, so there's nothing that easily can be done for that case.

However during testing it seems that with the right timing the session store can also receive the TabOpen event between quit-application-requested/-proceeding and application-quit. Ordinarily, we collect the window data one last time during quit-application-requested - when the data is flushed in response to application-quit, the window has already closed and no data is updated. As a partial fix, we could therefore have the session store collect the window data once more if a new tab is opened within that time span, i.e. while the load state is still STATE_QUITTING.
Comment on attachment 8827274 [details]
Bug 1330079 - Collect window data one more time if a new tab arrives before application-quit.

https://reviewboard.mozilla.org/r/104970/#review105962
Attachment #8827274 - Flags: review?(s.kaspari) → review+
tested locally, should be okay without a try run
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c8754bb4f8c1
Collect window data one more time if a new tab arrives before application-quit. r=sebastian
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c8754bb4f8c1
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Depends on: 1343995
You need to log in before you can comment on or make changes to this bug.