Bug 1769672 [wpt PR 34088] - [ImageDecoder] Ensure ReadableStream consumer is cancelled., a=testonly
authorDale Curtis <dalecurtis@chromium.org>
Wed, 18 May 2022 03:36:18 +0000
changeset 618491 7c7801abeb1f9317c82b43442a284ebdae7ff8da
parent 618490 ad9a62b2ea4c5555fd3b6dd98c6f75e2b250497f
child 618492 28d8297085fe0974241e612f2204a1d6a0169d4c
push id163295
push userwptsync@mozilla.com
push dateSun, 22 May 2022 08:42:45 +0000
treeherderautoland@28d8297085fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1769672, 34088, 1319714, 3629902, 1004567
milestone102.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1769672 [wpt PR 34088] - [ImageDecoder] Ensure ReadableStream consumer is cancelled., a=testonly Automatic update from web-platform-tests [ImageDecoder] Ensure ReadableStream consumer is cancelled. 34dc1247e6267b54675f580862b909d927c5f124 mistakenly removed a call to ReadableStreamBytesConsumer::Cancel() during some shutdown paths. The consumer must be cancelled in all cases after activation or it can issue calls back into the client we register after destruction. R=japhet Fixed: 1319714 Change-Id: I4495e470484ac66564d5ee271cd059bb7021117b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3629902 Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/heads/main@{#1004567} -- wpt-commits: dd05a4454ef3e76677d1191823b34420f3ea9355 wpt-pr: 34088
testing/web-platform/tests/webcodecs/image-decoder-disconnect-readable-stream-crash.https.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webcodecs/image-decoder-disconnect-readable-stream-crash.https.html
@@ -0,0 +1,12 @@
+<title>Test ImageDecoder destruction w/ ReadableStream doesn't crash.</title>
+<body>
+<script>
+let iframe = document.createElement('iframe');
+document.body.appendChild(iframe);
+let decoder = new iframe.contentWindow.ImageDecoder({
+    data: new Blob(['blob']).stream(),
+    type: 'image/jpeg',
+});
+document.querySelector('body').remove();
+</script>
+</body>