gecko-dev/startupcache
Doug Thayer 2b194eb9d0 Bug 1656261 - Ensure we clean up after WriteToDisk r=froydnj
Given all of the MOZ_TRYs in WriteToDisk, it's entirely possible that
we occasionally exit it before writing everything out. WriteToDisk
additionally adds guards to try to ensure that we do not call it twice,
and that we do not try to read things out of the file via the memmapped
buffer after it has written to it. The latter should not generally be
a problem, since we write to a temp file and move that over at the end.
However, writing twice could be a problem as we modify our values'
mOffsets to keep track of their offsets within the resulting file.

Accordingly, this change simply moves the cleanup and guards into an
RAII helper to ensure they survive all of the early returns.

Differential Revision: https://phabricator.services.mozilla.com/D89253
2020-09-09 13:42:27 +00:00
..
test Bug 1658732 - Replace mStartupFinished with TryLock in StartupCache r=froydnj 2020-08-20 18:37:21 +00:00
PStartupCache.ipdl Bug 1627075 - OMT and OMP StartupCache access r=froydnj 2020-07-08 02:46:11 +00:00
StartupCache.cpp Bug 1656261 - Ensure we clean up after WriteToDisk r=froydnj 2020-09-09 13:42:27 +00:00
StartupCache.h Bug 1656261 - Don't set scache mData until decompression done r=froydnj 2020-08-21 13:20:19 +00:00
StartupCacheChild.cpp Bug 1651941 - Free unreferenced child StartupCache entries on send r=froydnj 2020-07-22 20:31:31 +00:00
StartupCacheChild.h Bug 1651941 - Avoid unnecessary empty StartupCaches r=froydnj 2020-07-22 20:31:21 +00:00
StartupCacheInfo.cpp Bug 1626815 - Expose startup cache info to about:support. r=froydnj,fluent-reviewers 2020-04-02 19:40:39 +00:00
StartupCacheInfo.h Bug 1626815 - Expose startup cache info to about:support. r=froydnj,fluent-reviewers 2020-04-02 19:40:39 +00:00
StartupCacheParent.cpp Bug 1651941 - Avoid unnecessary empty StartupCaches r=froydnj 2020-07-22 20:31:21 +00:00
StartupCacheParent.h Bug 1651941 - Avoid unnecessary empty StartupCaches r=froydnj 2020-07-22 20:31:21 +00:00
StartupCacheUtils.cpp Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj 2020-08-07 07:49:47 +00:00
StartupCacheUtils.h
components.conf Bug 1626815 - Expose startup cache info to about:support. r=froydnj,fluent-reviewers 2020-04-02 19:40:39 +00:00
moz.build Bug 1627075 - OMT and OMP StartupCache access r=froydnj 2020-07-08 02:46:11 +00:00
nsIStartupCacheInfo.idl Bug 1626815 - Expose startup cache info to about:support. r=froydnj,fluent-reviewers 2020-04-02 19:40:39 +00:00