-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assertion failure in ~CompletionHandler() via ImageBitmap::createComp…
…letionHandler https://bugs.webkit.org/show_bug.cgi?id=270379 Reviewed by Wenson Hsieh. Call the completion handler when exiting early in PendingImageBitmap::fetch. * LayoutTests/fast/images/create-image-bitmap-after-stopping-script-execution-context-expected.txt: Added. * LayoutTests/fast/images/create-image-bitmap-after-stopping-script-execution-context.html: Added. * Source/WebCore/html/ImageBitmap.cpp: Canonical link: https://commits.webkit.org/275581@main
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...ests/fast/images/create-image-bitmap-after-stopping-script-execution-context-expected.txt
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,4 @@ | ||
This tests calling createImageBitmap on a window without a browsing context. | ||
WebKit should not crash and should show pass below. | ||
|
||
Partial PASS |
27 changes: 27 additions & 0 deletions
27
LayoutTests/fast/images/create-image-bitmap-after-stopping-script-execution-context.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,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<p>This tests calling createImageBitmap on a window without a browsing context.<br> | ||
WebKit should not crash and should show pass below.</p> | ||
<div id="result">Running</div> | ||
<script> | ||
if (window.testRunner) { | ||
testRunner.dumpAsText(); | ||
testRunner.waitUntilDone(); | ||
setTimeout(() => { | ||
testRunner.notifyDone(); | ||
}, 10); // Needs to happen after promise.catch below. | ||
} | ||
|
||
const iframe = document.createElement('iframe'); | ||
document.documentElement.appendChild(iframe); | ||
const contentWindow = iframe.contentWindow; | ||
iframe.remove(); | ||
const promise = contentWindow.createImageBitmap(new Blob()); | ||
|
||
result.textContent = 'Partial PASS'; | ||
promise.catch(() => result.textContent = 'PASS'); | ||
|
||
</script> | ||
</body> | ||
</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