Skip to content

Commit

Permalink
WebTransport: Remove Controller()->NoteHasBeenCanceled()
Browse files Browse the repository at this point in the history
Remove an unnecessary call to Controller()->NoteHasBeenCanceled() in the
Cancel() method of WebTransport::DatagramUnderlyingSource. It has
already been called in UnderlyingSourceBase::cancelWrapper() so the call
was redundant.

BUG=1292387,1292463

Change-Id: Ie30f983e257bff3606f13268cabf8fde83d4543d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3428509
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#966047}
  • Loading branch information
ricea authored and chromium-wpt-export-bot committed Feb 2, 2022
1 parent d3d74c5 commit 9efe5ea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions webtransport/datagram-cancel-crash.https.window.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This test reproduces Chromium issue https://crbug.com/1292387. If it doesn't
// crash then the test passed.

test(() => {
const iframeTag = document.createElement('iframe');
document.body.appendChild(iframeTag);
const wt = new iframeTag.contentWindow.WebTransport('https://example.com/');
iframeTag.remove();
const datagrams = wt.datagrams;
const reader = datagrams.readable;
reader.cancel();
}, 'call cancel() on stream in destroyed realm');

0 comments on commit 9efe5ea

Please sign in to comment.