Skip to content

Commit

Permalink
Web Locks: Make 'signal' member non nullable in LockOptions
Browse files Browse the repository at this point in the history
This CL makes 'signal' member in LockOption non nullable
to be spec conformant. [1]
It also drops a test that is inconsistent with this change.

[1] https://inexorabletash.github.io/web-locks/#idl-index


Bug: 855968
Change-Id: I4faf6582451347a05eeca34f02e25a43217d86cd
Reviewed-on: https://chromium-review.googlesource.com/1121953
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572244}
  • Loading branch information
peria authored and Commit Bot committed Jul 3, 2018
1 parent 185e5ed commit 9ef3909
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions third_party/WebKit/LayoutTests/http/tests/locks/signal.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
res, {signal}, t.unreached_func('callback should not run')),
'Bindings should throw if the signal option is a not an AbortSignal');
}

// These cases should work:
for (const signal of [null, undefined]) {
assert_equals(
undefined,
await navigator.locks.request(res, {signal}, lock => {}),
'Bindings should accept a null-ish signal option');
}
}, 'The signal option must be an AbortSignal');

promise_test(async t => {
Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/modules/locks/lock_options.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dictionary LockOptions {
LockMode mode = "exclusive";
boolean ifAvailable = false;
boolean steal = false;
AbortSignal? signal;
AbortSignal signal;
};

0 comments on commit 9ef3909

Please sign in to comment.