Closed Bug 1746059 Opened 2 years ago Closed 2 years ago

MOZ_CRASH("todo") when ImageBitmapRenderingContext::TransferFromImageBitmap called

Categories

(Core :: Graphics: Canvas2D, defect, P3)

defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

Details

Attachments

(1 file)

When one calls ImageBitmapRenderingContext::TransferFromImageBitmap, we try to get the ImageContainer from the OffscreenCanvas object but we explicitly crash:

https://searchfox.org/mozilla-central/rev/f465d324513f09dbe33ed79fabe6a9ef98aa51ca/dom/canvas/OffscreenCanvas.cpp#155

This just needs to hook up to OffscreenCanvas::CommitFrameToCompositor properly I think. There are relevant WPT tests that should be marked as passing once this is fixed.

This patch ensures that when we call TransferFromImageBitmap, it
actually gets the correct result and resets the context to all black,
instead of just crashing. We now also clear the ImageContainer properly
instead of adding a null image if none is provided.

Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/91c3b4249ff0
Fix broken ImageBitmapRenderingContext::TransferFromImageBitmap for OffscreenCanvas. r=lsalzman,emilio
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: