Bug 241251 - SharedBuffer argument passed in the various Images class method should be const.
Summary: SharedBuffer argument passed in the various Images class method should be const.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-02 19:19 PDT by Jean-Yves Avenard [:jya]
Modified: 2022-06-07 08:08 PDT (History)
2 users (show)

See Also:


Attachments

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