Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imported/w3c/web-platform-tests/background-fetch/abort.https.window.h…
…tml 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
- Loading branch information
Mark Lam
committed
May 24, 2023
1 parent
f06fb53
commit 37cf833
Showing
10 changed files
with
180 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.