mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
aae08137ff
LockManager only calls LockManager::Shutdown() in the WeakWorkeRef callback to release the resource of LockManagerChild, which includs a RefPtr<nsIGlobalObject> mOwner(WorkerGlobalScope). However, WeakWorkerRef creation could fail if the Worker get into "Canceling" immediately. But we did not handle the case. LockManagerChild is a background actor, which can live longer than WorkerPrivate itself until the Background actors destroying. So if the case that WeakWorkerRef creation fails, it could cause the WorkerGlobalScope keep alive until BackgroundChild shutdown. But we assert that the WorkerGlobalScope need to be released before releasing the WorkerPrivate. This patch calls LockManager::Shutdown() in WorkerNavigator::Invalidate() to ensure the LockManagerChild is released during the Worker shutdown. Differential Revision: https://phabricator.services.mozilla.com/D222463 |
||
---|---|---|
.. | ||
test | ||
IPCUtils.h | ||
Lock.cpp | ||
Lock.h | ||
LockManager.cpp | ||
LockManager.h | ||
LockManagerChild.cpp | ||
LockManagerChild.h | ||
LockManagerParent.cpp | ||
LockManagerParent.h | ||
LockRequestChild.cpp | ||
LockRequestChild.h | ||
LockRequestParent.cpp | ||
LockRequestParent.h | ||
moz.build | ||
PLockManager.ipdl | ||
PLockRequest.ipdl |