gecko-dev/startupcache
Nika Layzell a2f7e06013 Bug 1841660 - Fix potential deadlock waiting for StartupCache ThreadedPrefetch, r=jesup
In a previous change to this logic, we missed a hidden early return in
the `MMAP_FAULT_HANDLER_CATCH()` macro which can early return on both
Linux and Windows. If this is hit, we could end up blocking at various
points waiting for the StartupCache to be prefetched.

This patch changes the logic to notify to happen in a ScopeExit instead,
ensuring that it'll happen on all return paths.

In addition, there was another potential deadlock due to the
ThreadedPrefetch thread acquiring mTableLock. This was fixed by passing
in the pointers in the runnable instead. This should be OK as we are
making sure to block on ThreadedPrefetch before we clear the startup
data already.

Differential Revision: https://phabricator.services.mozilla.com/D182732
2023-07-04 19:05:06 +00:00
..
test
components.conf
moz.build
nsIStartupCacheInfo.idl
StartupCache.cpp Bug 1841660 - Fix potential deadlock waiting for StartupCache ThreadedPrefetch, r=jesup 2023-07-04 19:05:06 +00:00
StartupCache.h Bug 1841660 - Fix potential deadlock waiting for StartupCache ThreadedPrefetch, r=jesup 2023-07-04 19:05:06 +00:00
StartupCacheInfo.cpp
StartupCacheInfo.h
StartupCacheUtils.cpp
StartupCacheUtils.h