Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a8c1d272ba0a7f06ea3cbce59998bde33b206056
https://github.com/WebKit/WebKit/commit/a8c1d272ba0a7f06ea3cbce59998bde33b206056
Author: Chris Dumez <[email protected]>
Date: 2026-06-02 (Tue, 02 Jun 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.https.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.https.any.serviceworker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.https.any.sharedworker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.https.any.worker-expected.txt
M Source/WebCore/Modules/web-locks/WebLockManager.cpp
Log Message:
-----------
Web Locks: request() with already-aborted signal rejects with synthetic
AbortError instead of signal.reason
https://bugs.webkit.org/show_bug.cgi?id=316073
Reviewed by Anne van Kesteren.
When navigator.locks.request() is called with an AbortSignal that is
already aborted, the spec requires the returned promise to be rejected
with the signal's abort reason (per "Request a lock", step 8). WebKit
was instead rejecting with a synthesized AbortError DOMException whose
message was "WebLockOptions's signal is aborted", losing the caller's
custom abort reason and producing a different rejection value than the
default AbortError the platform already attaches to the signal.
The analogous "abort while pending" path (signalToAbortTheRequest) was
already correct: it forwards the reason JSValue via reject<IDLAny>().
Apply the same treatment here.
This makes the following web-platform-tests pass:
* web-locks/signal.https.any.html: Passing an already aborted signal
rejects with the custom abort reason.
* web-locks/signal.https.any.html: Passing an already aborted signal
rejects with the default abort reason.
(plus the worker, sharedworker, and serviceworker variants).
*
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.https.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.https.any.serviceworker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.https.any.sharedworker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.https.any.worker-expected.txt:
* Source/WebCore/Modules/web-locks/WebLockManager.cpp:
(WebCore::WebLockManager::request):
Canonical link: https://commits.webkit.org/314404@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications