Closed Bug 964531 Opened 10 years ago Closed 2 years ago

Don't start the SessionWorker on shutdown

Categories

(Firefox :: Session Restore, defect)

defect
Points:
8

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox100 --- fixed

People

(Reporter: ttaubert, Unassigned)

References

Details

Having a non-worker routine to read the session file (bug 959598) we would omit spawning the worker at startup. If we now quit the browser right after startup the first thing that would spawn the worker is the SessionFile.write call on shutdown.

Now the problem is that the Worker isn't actually going to do anything here but still we return a promise that blocks async shutdown. We will thus "hang" on shutdown and time out after 60s.

It sounds like either we would make the Worker work, or track whether we have used the SessionWorker before and if not fall back to a native write.

In theory, the OS.File shared worker could suffer from the same problem. It doesn't block async shutdown (or does it?) but it won't do anything either.
Weird, we're locking up even with the SessionWorker not passing anything useful to addBlocker(). The timeout message isn't printed either. Maybe the SessionWorker would work if we get that fixed, whatever "that" is.
Alternative title for this issue: Make OS.File/SessionWorker write when spawned on shutdown :)
Whiteboard: [feature] p=0
Because of this, we currently send a noop to the worker at startup so that it will always be ready to write at shutdown. We should eventually fix this and remove that hack.
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Whiteboard: [feature] p=0 → p=8
Points: --- → 8
Whiteboard: p=8
...and, this hack ends up causing bug 1251347, which was not visible until now because of bugs in sanitize.js.

The exciting life of developing Firefox :)

Session store doesn't use a worker as of bug 1752853.

No longer blocks: 959130
Severity: normal → --
Status: NEW → RESOLVED
Closed: 2 years ago
Depends on: 1752853, 959130
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.