[webkit-changes] [WebKit/WebKit] 37cf83: imported/w3c/web-platform-tests/background-fetch/a...
Commit Queue
noreply at github.com
Wed May 24 15:44:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 37cf833410faba85dfccf6bea74aa20292875fff
https://github.com/WebKit/WebKit/commit/37cf833410faba85dfccf6bea74aa20292875fff
Author: Mark Lam <mark.lam at apple.com>
Date: 2023-05-24 (Wed, 24 May 2023)
Changed paths:
M Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp
M Source/WebCore/bindings/js/JSDOMPromiseDeferred.h
M Source/WebCore/bindings/js/JSMicrotaskCallback.h
M Source/WebCore/dom/BroadcastChannel.cpp
M Source/WebCore/dom/MessagePort.cpp
M Source/WebCore/dom/Microtasks.cpp
M Source/WebCore/page/LocalDOMWindow.cpp
M Source/WebCore/workers/WorkerMessagingProxy.cpp
M Source/WebCore/workers/WorkerRunLoop.cpp
M Source/WebCore/workers/service/ServiceWorkerContainer.cpp
Log Message:
-----------
imported/w3c/web-platform-tests/background-fetch/abort.https.window.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=253314
<rdar://problem/106195333>
Reviewed by Chris Dumez.
The test was flakily crashing in debug bots when trying to resolve the promise of BackgroundFetchRegistration::matchAll.
The issue is that the toJS call can fail due to an exception. When this happens, it returns an empty value that is
used to resolve the promise.
To prevent this, we add a check in DeferredPromise::callFunction to handle uncaught exceptions. Also fix all exception
check validation failures under imported/w3c/web-platform-tests/background-fetch.
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp:
(WebCore::DeferredPromise::callFunction):
(WebCore::DeferredPromise::whenSettled):
(WebCore::DeferredPromise::reject):
(WebCore::rejectPromiseWithExceptionIfAny):
(WebCore::DeferredPromise::handleTerminationExceptionIfNeeded):
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DeferredPromise::resolve):
(WebCore::DeferredPromise::resolveWithNewlyCreated):
(WebCore::DeferredPromise::resolveCallbackValueWithNewlyCreated):
(WebCore::DeferredPromise::reject):
(WebCore::DeferredPromise::resolveWithCallback):
(WebCore::DeferredPromise::rejectWithCallback):
(WebCore::DeferredPromise::needsAbort const):
* Source/WebCore/bindings/js/JSMicrotaskCallback.h:
(WebCore::JSMicrotaskCallback::call):
* Source/WebCore/dom/BroadcastChannel.cpp:
(WebCore::BroadcastChannel::dispatchMessage):
* Source/WebCore/dom/MessagePort.cpp:
(WebCore::MessagePort::dispatchMessages):
* Source/WebCore/dom/Microtasks.cpp:
(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::processPostMessage):
* Source/WebCore/workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
* Source/WebCore/workers/WorkerRunLoop.cpp:
(WebCore::WorkerDedicatedRunLoop::Task::performTask):
* Source/WebCore/workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
(WebCore::ServiceWorkerContainer::postMessage):
Canonical link: https://commits.webkit.org/264489@main
More information about the webkit-changes
mailing list