Bug 219623

Summary: [GPU Process] Ensure the backend of ImageBuffer is created before getting its handle
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: CanvasAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=219007
https://bugs.webkit.org/show_bug.cgi?id=219563
Attachments:
Description Flags
Patch none

Description Said Abou-Hallawa 2020-12-07 19:12:15 PST
In r270458 and in RemoteLayerBackingStore::encode(), casting the ImageBuffer and calling the overriding createImageBufferBackendHandle() of the superclass was replaced by casting the backend() and calling its createImageBufferBackendHandle() directly.

This may lead to crash if the backend was not created when createImageBufferBackendHandle() is called. The createImageBufferBackendHandle() of the ImageBuffer superclass calls ensureBackendCreated() before calling its createImageBufferBackendHandle().

So we need to replace to call ImageBuffer::backend() to ImageBuffer::ensureBackendCreated().
Comment 1 Said Abou-Hallawa 2020-12-07 19:20:48 PST
Created attachment 415606 [details]
Patch
Comment 2 EWS 2020-12-07 20:15:19 PST
Committed r270529: <https://trac.webkit.org/changeset/270529>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415606 [details].
Comment 3 Radar WebKit Bug Importer 2020-12-07 20:16:20 PST
<rdar://problem/72075298>