gecko-dev/dom/locks
Eden Chuang aae08137ff Bug 1908240 - Call LockManager::Shutdown() in WorkerNavigator::Invalidate() r=dom-worker-reviewers,saschanaz,asuth
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
2024-09-23 11:54:00 +00:00
..
test Bug 1908240 - Call LockManager::Shutdown() in WorkerNavigator::Invalidate() r=dom-worker-reviewers,saschanaz,asuth 2024-09-23 11:54:00 +00:00
IPCUtils.h
Lock.cpp
Lock.h
LockManager.cpp Bug 1908240 - Call LockManager::Shutdown() in WorkerNavigator::Invalidate() r=dom-worker-reviewers,saschanaz,asuth 2024-09-23 11:54:00 +00:00
LockManager.h
LockManagerChild.cpp
LockManagerChild.h
LockManagerParent.cpp Bug 1908002 - Allow LockManager to be constructed in the parent process with the system principal and loaded in modules. r=saschanaz,smaug 2024-07-30 14:51:26 +00:00
LockManagerParent.h Bug 1908002 - Allow LockManager to be constructed in the parent process with the system principal and loaded in modules. r=saschanaz,smaug 2024-07-30 14:51:26 +00:00
LockRequestChild.cpp
LockRequestChild.h
LockRequestParent.cpp
LockRequestParent.h
moz.build
PLockManager.ipdl
PLockRequest.ipdl