Previous Firefox session is not restored when there is a pending Firefox update before the OS reboot

VERIFIED FIXED in Firefox 62

Status

()

defect
VERIFIED FIXED
Last year
Last year

People

(Reporter: Abe_LV, Assigned: agashlin)

Tracking

Trunk
mozilla62
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox62 verified)

Details

Attachments

(2 attachments)

Reporter

Description

Last year
Steps to reproduce:
Screen capture- https://testing-1.tinytake.com/sf/MjYxNzMxNF83ODcyNzU0

1. Open older Firefox that has the patch from Bug 603903
2. Create a new tab and go to https://www.facebook.com/
3. Check for the browser update. When it completes the update file download, do not restart the browser.
4. Restart the OS
5. Verify previous Firefox session is restored.

Actual result:
Sessions are not restored.
Instead, a new Firefox opens with the update applied 

Expected result:
Sessions should be restored in addition to the updates.
Reporter

Updated

Last year
Flags: needinfo?(agashlin)
I think this and bug 1463560 (session is not restored when an update was pending) are both due to me stripping out the -os-restarted command line switch early on. I do this early so that we don't treat Firefox restarts as OS restarts. However, in these two cases (update and profile manager), we can't consider the first running Firefox process to be a "real" initialization of the browser. There may be other such cases but I can't think of any, I think they are the exception and thus should be dealt with specially.
Flags: needinfo?(agashlin)
Oops, I thought this was the other bug. I meant to refer to bug 1463263, when tabs are not restored when starting with the profile manager (-p). As the current bug is more serious I'll fix them both under here.
Duplicate of this bug: 1463263
Comment hidden (mozreview-request)
Assignee: nobody → agashlin
Status: NEW → ASSIGNED

Comment 6

Last year
mozreview-review
Comment on attachment 8981017 [details]
Bug 1463560: Part 2: Re-add the -os-restarted arg when launching from profile manager.

https://reviewboard.mozilla.org/r/247138/#review255190

::: toolkit/xre/nsAppRunner.cpp:2180
(Diff revision 1)
>    aProfileSvc->GetStartOffline(&offline);
>    if (offline) {
>      SaveToEnv("XRE_START_OFFLINE=1");
>    }
> +  if (gRestartedByOS) {
> +    // Readd this argument when actually starting the application.

nit - 'readd'
Attachment #8981017 - Flags: review?(jmathies) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 9

Last year
mozreview-review
Comment on attachment 8981016 [details]
Bug 1463560: Part 1: Re-add the -os-restarted arg when launching after an update.

https://reviewboard.mozilla.org/r/247136/#review255200
Attachment #8981016 - Flags: review?(mhowell) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 12

Last year
Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6ab9a83f57c
Part 1: Re-add the -os-restarted arg when launching after an update. r=mhowell
https://hg.mozilla.org/integration/autoland/rev/06d152dae420
Part 2: Re-add the -os-restarted arg when launching from profile manager. r=jimm
Keywords: checkin-needed

Comment 13

Last year
bugherder
https://hg.mozilla.org/mozilla-central/rev/d6ab9a83f57c
https://hg.mozilla.org/mozilla-central/rev/06d152dae420
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Reporter

Comment 14

Last year
We have tested this on different Windows OSes and it is verified as fixed.
When the OS restarts during a Firefox update, updates are applied to Firefox and previous sessions are restored. 

Test Environment:
-----------------
Version 	62.0a1
Build ID 	20180614100146
Update Channel 	nightly
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.