[Webkit-unassigned] [Bug 274575] assert_throws_dom: function "function() { ctx.drawImage(img, 0, 0); }" did not throw

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 22 23:13:16 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=274575

--- Comment #3 from Karl Dubost <karlcow at apple.com> ---
There's an image
<img src="/images/not-found-at-all.png" id="not-found-at-all.png" class="resource">

Then 
var img = document.getElementById('not-found-at-all.png');
and
ctx.drawImage(img, 0, 0);

On Firefox 
Uncaught DOMException: CanvasRenderingContext2D.drawImage: Passed-in image is "broken"

On Chrome it will return 
Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state.

On Safari
undefined

It doesn't throw and there is no helpful message.

That should be easy to fix. 
https://searchfox.org/wubkat/rev/c2e64ba96fbed90353cfdea4b0c20a855a6c40bb/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp#1541-1559

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240523/6f793399/attachment.htm>


More information about the webkit-unassigned mailing list