-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AbortSignal.timeout is a static method that creates a new AbortSignal that is automatically aborted after a specified duration. The implementation is essentially PostDelayedTask(SignalAbort, ms). Throttling: this API is specced to use the timer task source, but there are three internally due to our throttling implementation. We use immediate for the timeout == 0 case and high nesting for timeount > 0 (the typical case), i.e. all non-zero timeouts are eligible for throttling (Note: this matches scheduler.postTask()). Spec PR: whatwg/dom#1032 I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/9Y290P1WimY/m/bru989iAAgAJ Bug: 1181925 Change-Id: I192d82a8bf12c368abcd47ae6c50e80f50654cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3425124 Reviewed-by: Domenic Denicola <domenic@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Scott Haseley <shaseley@chromium.org> Cr-Commit-Position: refs/heads/main@{#966406} NOKEYCHECK=True GitOrigin-RevId: 6418fb5de0252c4cca60b9027237ad24f074465a
- Loading branch information
1 parent
fdc5daf
commit 7a462a8
Showing
12 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
blink/web_tests/external/wpt/dom/abort/abort-signal-timeout.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE HTML> | ||
<meta charset=utf-8> | ||
<title>AbortSignal.timeout frame detach</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<iframe id="iframe"></iframe> | ||
<script> | ||
async_test(t => { | ||
const signal = iframe.contentWindow.AbortSignal.timeout(5); | ||
signal.onabort = t.unreached_func("abort must not fire"); | ||
|
||
iframe.remove(); | ||
|
||
t.step_timeout(() => { | ||
assert_false(signal.aborted); | ||
t.done(); | ||
}, 10); | ||
}, "Signal returned by AbortSignal.timeout() is not aborted after frame detach"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters