mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1226443 P6 Ignore update() called during top level service worker script evaluation. r=ehsan
This commit is contained in:
parent
da61400d46
commit
b0f1420e24
@ -1000,6 +1000,14 @@ ServiceWorkerRegistrationWorkerThread::Update(ErrorResult& aRv)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Avoid infinite update loops by ignoring update() calls during top
|
||||
// level script evaluation. See:
|
||||
// https://github.com/slightlyoff/ServiceWorker/issues/800
|
||||
if (worker->LoadScriptAsPartOfLoadingServiceWorkerScript()) {
|
||||
promise->MaybeResolve(JS::UndefinedHandleValue);
|
||||
return promise.forget();
|
||||
}
|
||||
|
||||
RefPtr<PromiseWorkerProxy> proxy = PromiseWorkerProxy::Create(worker, promise);
|
||||
if (!proxy) {
|
||||
aRv.Throw(NS_ERROR_DOM_ABORT_ERR);
|
||||
|
Loading…
Reference in New Issue
Block a user