Web Locks API: implement 'signal' option |
|||
Issue descriptionhttps://github.com/inexorabletash/web-locks/ https://github.com/inexorabletash/web-locks/blob/master/proto-spec.md const controller = new AbortController(); setTimeout(() => controller.abort(), 200); // wait at most 200ms try { await navigator.locks.acquire('resource', {signal: controller.signal}, async lock => { ... }); } catch (ex) { // |ex| will be a DOMException with error name "AbortError" if timer fired. }
,
Feb 5 2018
,
Feb 7 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a3f59d93ab1f840a114a8e457a89d8b293366ed0 commit a3f59d93ab1f840a114a8e457a89d8b293366ed0 Author: Joshua Bell <jsbell@chromium.org> Date: Wed Feb 07 19:20:05 2018 Web Locks API: Implement 'signal' option Implement passing an AbortSignal into the lock request, which allows the request to be aborted e.g. after a timeout. For example: Also, consolidate tests for mutually-exclusive options. Explainer: https://github.com/inexorabletash/web-locks Bug: 808732 , 807499 Change-Id: I1f5013bd900e056868e244f56fd923faa20de120 Reviewed-on: https://chromium-review.googlesource.com/902432 Commit-Queue: Joshua Bell <jsbell@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#535095} [modify] https://crrev.com/a3f59d93ab1f840a114a8e457a89d8b293366ed0/third_party/WebKit/LayoutTests/http/tests/locks/acquire.html [add] https://crrev.com/a3f59d93ab1f840a114a8e457a89d8b293366ed0/third_party/WebKit/LayoutTests/http/tests/locks/signal.html [modify] https://crrev.com/a3f59d93ab1f840a114a8e457a89d8b293366ed0/third_party/WebKit/LayoutTests/http/tests/locks/steal.html [modify] https://crrev.com/a3f59d93ab1f840a114a8e457a89d8b293366ed0/third_party/WebKit/Source/modules/locks/LockManager.cpp [modify] https://crrev.com/a3f59d93ab1f840a114a8e457a89d8b293366ed0/third_party/WebKit/Source/modules/locks/LockOptions.idl
,
Feb 7 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jsb...@chromium.org
, Feb 3 2018Blocking: 161072