On Friday, May 10, 2013 7:53:01 PM UTC-3, Benjamin Smedberg wrote: > I'm not sure about the rest of this question. But you should not be > > performing any I/O after profile-before-change. See > > https://wiki.mozilla.org/XPCOM_Shutdown and note that after > > profile-before-change, we are working on immediately exiting the browser > > and skipping XPCOM shutdown. xpcom-shutdown is definitely too late!
Okay. The code i'm touching does that on xpcom-shutdown but since it'll be wrong in the future I'll change it while I'm there. (it finishes some pending async sqlite stmts and rolls back any ongoing transactions). What prompted the question is that I'm working on a conversion from SQLite storage to a JSON file. OS.File.writeAtomic provides a good guarantee of data consistency against crashes etc, and I'm now looking how to guarantee a proper full flush of the data to disk during shutdown. Should profile-before-change then be my call to stop accepting changes to the data and call writeAtomic to flush it? I've seen some code nearby doing it at quit-application-granted. Or perhaps there's no "correct" answer and it varies case by case (or anything goes that works and is early enough..) _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform