Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
idle-detection: Reject start Promise on abort
This change fixes the IdleDetector interface's start() method so that if the provided AbortSignal is signaled before the Promise it returns settles it will reject with the provided abort reason instead. In addition to violating the specification this scenario created an internal consistenty error which triggered a DCHECK in Update() but was otherwise harmless. This issue was introduced by the original change that moved IdleDetector to use an AbortSignal and made it so that the `resolver_` field was never actually populated with the Promise returned by start(). Tests have been added to more completely exercise the AbortSignal behavior. Bug: 1315755 Change-Id: I394587bddf2e8176ff3f691d7f33e494af364684 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3582549 Auto-Submit: Reilly Grant <reillyg@chromium.org> Reviewed-by: Matt Reynolds <mattreynolds@chromium.org> Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/main@{#992258}
- Loading branch information