Commit Graph

18 Commits

Author SHA1 Message Date
David Rajchenbach-Teller
470b1f7f8b Bug 1251347 - Making sure that SessionFile.write initializes its workers;r=mconley
Bug 1243549 fixed a race condition during SessionFile startup which
could cause calls to SessionFile.write to send messages to the worker
before it was initialized. The fix consisted in waiting until
initialization was complete before proceeding.

As it turns out, there are cases in which we send messages to the
worker without ever attempting to initialize it, so this wait ends up
causing a hang/shutdown.

This patch fixes the issue by making sure that any message sent to the
worker first initializes the worker if it hasn't been initialized
yet. Since initializing the worker requires us reading the session
store files to find out which one is valid, well, we do exactly that.

MozReview-Commit-ID: 1bOgCaF6ahM
2016-02-26 12:02:43 +01:00
David Rajchenbach-Teller
5b4f41e0a5 Bug 1251347 - Refining SessionFile Shutdown hang details;r=me
MozReview-Commit-ID: Jag5oFwKTqr
2016-02-26 11:11:47 +01:00
David Rajchenbach-Teller
4f79ec13cb Bug 1243549 - SessionFile.wipe() now waits until SessionFile has been properly initialized. r=mconley
While investigating bug 1243549, we encountered several instances of the following error message during each startup:

*************************
A coding exception was thrown and uncaught in a Task.

Full message: TypeError: this.Paths is null
Full stack: Agent.wipe@resource:///modules/sessionstore/SessionWorker.js:296:7
worker.dispatch@resource:///modules/sessionstore/SessionWorker.js:21:24
anonymous/AbstractWorker.prototype.handleMessage@resource://gre/modules/workers/PromiseWorker.js:122:16
@resource:///modules/sessionstore/SessionWorker.js:30:41

*************************

These messages can be explained as follows:

* If sanitization has failed during shutdown, it attempts again to
  sanitize during startup. This happens more often than it used to,
  because of 1/ startup bug fixes in bug 1089695; 2/ new shutdown bugs
  most likely also added by or around bug 1089695.

* Sanitization during startup doesn't wait until Session Restore has
  properly started to sanitize the session. So sanitization of Session
  Restore file fails. This has probably always been the case, except
  we never noticed.

* For some reason I do not understand, it attempts to sanitize several
  times.

* I suspect that this can cause problems during startup, as
  sanitization and Session Restore race to use/remove the files of
  Session Restore.

This patch makes sure that SessionFile.wipe() waits until
initialization of SessionFile is complete before proceeding.
2016-02-02 12:56:11 +01:00
Alexandre Poirot
f1439bdbe8 Bug 1204812 - Keep Console.jsm in toolkit/modules/ r=jryans,Mossop 2015-10-15 03:45:22 -07:00
Fabian Furger
9b580992a1 Bug 1147822 - Add a format version number for sessionstore.js. r=Yoric 2015-10-11 20:24:32 +02:00
J. Ryan Stinnett
2dada8f365 Bug 912121 - Rewrite require / import to match source tree. rs=devtools
In a following patch, all DevTools moz.build files will use DevToolsModules to
install JS modules at a path that corresponds directly to their source tree
location.  Here we rewrite all require and import calls to match the new
location that these files are installed to.
2015-09-21 12:04:18 -05:00
Shu-yu Guo
37989840cd Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
David Rajchenbach-Teller
9103463632 Bug 1034075 - Add more details to SessionFile AsyncShutdown blocker. r=ttaubert 2015-05-19 13:53:41 +02:00
Tim Taubert
cdc02a8a22 Bug 1150529 - Remove code for expired telemetry histograms r=Yoric 2015-05-02 09:56:39 +02:00
Tim Taubert
c38ef6fef5 Bug 1134518 - Cap shistory entries in the SessionWorker when shutting down r=Yoric 2015-04-22 18:41:32 +02:00
Tim Taubert
1cbb05dd90 Bug 1152341 - Failure to read one of the session file candidates shouldn't stop us from trying further r=Yoric 2015-04-15 15:27:12 +02:00
Fabian Furger
6ebe394909 Bug 1107941 - Removing old upgrade backups if too many exist. Max upgrade backups is defined in preferences. Tested with mochi tests. r=Yoric 2015-04-02 17:09:31 +01:00
Tim Taubert
f5cf557b7f Bug 960959 - Use RunState to keep track of the SessionFile's closed status r=yoric 2014-10-20 13:08:44 +02:00
Iaroslav Sheptykin
ca3f9d7567 Bug 1031298 - Add a histogram for counting unrecoverable sessions. r=yoric 2014-09-25 13:39:00 -04:00
Tim Taubert
9aa3899b85 Bug 1020831 - Make SessionStore.jsm and SessionFile.jsm share the same run state r=yoric 2014-09-25 23:26:41 +02:00
Tim Taubert
16f13424f2 Bug 1072814 - Fix SessionFile.jsm to use new Promise() API r=yoric 2014-09-25 04:51:37 +02:00
Steven MacLeod
dffb2388bc Bug 1036341 - Use the existence of any session files to determine if a profile crashed or is fresh. r=ttaubert 2014-08-12 15:38:55 -04:00
Birunthan Mohanathas
5a68dfde5b Bug 1038458 - Part 6: Flatten browser/components/sessionstore/src/ directory. r=mak 2014-07-26 09:32:08 -07:00