Bug 219623 - [GPU Process] Ensure the backend of ImageBuffer is created before getting its handle
Summary: [GPU Process] Ensure the backend of ImageBuffer is created before getting its...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
Keywords: InRadar
Depends on:
Reported: 2020-12-07 19:12 PST by Said Abou-Hallawa
Modified: 2020-12-07 20:16 PST (History)
5 users (show)

See Also:

Patch (6.37 KB, patch)
2020-12-07 19:20 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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