Bug 1928123 - CookieStore must check if the worker is already shutting down, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D227564
This commit is contained in:
@@ -129,6 +129,11 @@ void CookieStoreNotificationWatcherWrapper::ResolvePromiseWhenNotified(
|
||||
workerPrivate, "CookieStoreNotificationWatcher::PromiseResolver",
|
||||
[resolver = RefPtr(resolver)]() { resolver->Run(); });
|
||||
|
||||
if (!strongWorkerRef) {
|
||||
// The worker is already shutting down. Let's ignore this promise.
|
||||
return;
|
||||
}
|
||||
|
||||
workerRef = new ThreadSafeWorkerRef(strongWorkerRef);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user