зеркало из https://github.com/mozilla/gecko-dev.git
2b194eb9d0
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 |
||
---|---|---|
.. | ||
test | ||
PStartupCache.ipdl | ||
StartupCache.cpp | ||
StartupCache.h | ||
StartupCacheChild.cpp | ||
StartupCacheChild.h | ||
StartupCacheInfo.cpp | ||
StartupCacheInfo.h | ||
StartupCacheParent.cpp | ||
StartupCacheParent.h | ||
StartupCacheUtils.cpp | ||
StartupCacheUtils.h | ||
components.conf | ||
moz.build | ||
nsIStartupCacheInfo.idl |