-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1890072 [wpt PR 45590] - Use typed promises/resolvers for Readabl…
…eStream and related classes, attempt #3, a=testonly Automatic update from web-platform-tests Use typed promises/resolvers for ReadableStream and related classes, attempt #3 This converts IDL-exposed promises in ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, and ReadableStreamGenericReader to use typed ScriptPromiseResolver instead of StreamPromiseResolver and to return typed ScriptPromises. Bug: 329702363 Change-Id: I8ad1af1a7c9c909d711881ce7621c6c9fac58931 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5429731 Reviewed-by: Adam Rice <ricea@chromium.org> Reviewed-by: Nidhi Jaju <nidhijaju@chromium.org> Commit-Queue: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/heads/main@{#1289397} -- wpt-commits: 26d974425bf402e6ceb7a28480800d1942236b8c wpt-pr: 45590
- Loading branch information
1 parent
d0845c9
commit f73e6c1
Showing
4 changed files
with
37 additions
and
2 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
21 changes: 21 additions & 0 deletions
21
testing/web-platform/tests/streams/piping/detached-context-crash.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,21 @@ | ||
<!DOCTYPE html> | ||
<body> | ||
<script> | ||
window.onload = () => { | ||
const i = document.createElement("iframe"); | ||
i.src = "about:blank"; | ||
document.body.appendChild(i); | ||
|
||
const rs = new i.contentWindow.ReadableStream({ | ||
start(controller) { controller.error(); } | ||
}); | ||
const ws = new i.contentWindow.WritableStream(); | ||
|
||
i.remove(); | ||
|
||
// pipeTo() should not crash with a ReadableStream or WritableStream from | ||
// a detached iframe. | ||
rs.pipeTo(ws); | ||
}; | ||
</script> | ||
</body> |
13 changes: 13 additions & 0 deletions
13
testing/web-platform/tests/streams/readable-streams/tee-detached-context-crash.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,13 @@ | ||
<!doctype html> | ||
<body> | ||
<script> | ||
const i = document.createElement("iframe"); | ||
document.body.appendChild(i); | ||
|
||
const rs = new i.contentWindow.ReadableStream(); | ||
i.remove(); | ||
|
||
// tee() on a ReadableStream from a detached iframe should not crash. | ||
rs.tee(); | ||
</script> | ||
</body> |