зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1447871 P1 Call DisconnectFromOwner() on service worker binding objects in FreeInnerObjects(). r=asuth
This commit is contained in:
Родитель
c66f288715
Коммит
5937e67051
|
@ -1379,6 +1379,23 @@ nsGlobalWindowInner::FreeInnerObjects()
|
|||
// that the Promises can resolve.
|
||||
CallDocumentFlushedResolvers();
|
||||
mObservingDidRefresh = false;
|
||||
|
||||
// Disconnect service worker objects in FreeInnerObjects(). This is normally
|
||||
// done from CleanUp(). In the future we plan to unify CleanUp() and
|
||||
// FreeInnerObjects(). See bug 1450266.
|
||||
ForEachEventTargetObject([&] (DOMEventTargetHelper* aTarget, bool* aDoneOut) {
|
||||
RefPtr<ServiceWorkerRegistration> swr = do_QueryObject(aTarget);
|
||||
if (swr) {
|
||||
aTarget->DisconnectFromOwner();
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<ServiceWorker> sw = do_QueryObject(aTarget);
|
||||
if (sw) {
|
||||
aTarget->DisconnectFromOwner();
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
|
|
Загрузка…
Ссылка в новой задаче