Web Locks API: query() if no locks are held never resolves / DCHECKS |
|||
Issue descriptionReported by @ralphch0 - if navigator.locks.query() is called and no locks are held, the returned promise is never resolved. From code inspection, we drop the callback on the floor. This would likely DCHECK in a debug build since all mojo requests need responses.
,
Jan 30 2018
,
Jan 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/41cfa934f0cc71ae5ef3b59622add0a6b963fcb1 commit 41cfa934f0cc71ae5ef3b59622add0a6b963fcb1 Author: Joshua Bell <jsbell@chromium.org> Date: Wed Jan 31 03:18:19 2018 Web Locks API: query() needs callback even if origin is empty Issue reported by canary dogfooder: the promise returned by navigator.locks.query() would never resolve if no locks were held. In debug builds, this would DCHECK. The code would early-exit without running the callback in this case - a no-no. Added fix (return empty arrays) and test case. Bug: 807070 Change-Id: Ib4abd5d861c5ab259f7ea00355aebd006438508e Reviewed-on: https://chromium-review.googlesource.com/891584 Commit-Queue: Joshua Bell <jsbell@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#533184} [modify] https://crrev.com/41cfa934f0cc71ae5ef3b59622add0a6b963fcb1/content/browser/locks/lock_manager.cc [add] https://crrev.com/41cfa934f0cc71ae5ef3b59622add0a6b963fcb1/third_party/WebKit/LayoutTests/http/tests/locks/query-empty.html
,
Jan 31 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jsb...@chromium.org
, Jan 29 2018