Bug 241251

Summary: SharedBuffer argument passed in the various Images class method should be const.
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: ImagesAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: NEW ---    
Severity: Normal CC: sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=241110

Description Jean-Yves Avenard [:jya] 2022-06-02 19:19:56 PDT
In bug 241110 we had to use const_cast to take a strong reference on a SharedBuffer.
The various SharedBuffer received from networking are const, but Image related classes take a non-const SharedBuffer reference.

SharedBuffer is an immutable object, but passing the objects as const reference is the right thing to do.
Comment 1 Radar WebKit Bug Importer 2022-06-02 19:20:17 PDT
<rdar://problem/94324781>
Comment 2 Jean-Yves Avenard [:jya] 2022-06-07 08:08:34 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1350