Bug 233922 - [meta] Ensure that no SharedBuffer is modified once returned
Summary: [meta] Ensure that no SharedBuffer is modified once returned
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on: 233442 233923
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-07 04:01 PST by Jean-Yves Avenard [:jya]
Modified: 2021-12-14 04:02 PST (History)
1 user (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] 2021-12-07 04:01:06 PST
Follow-up on bug 233442.

With the SharedBufferBuilder, some code still return a Ref to a SharedBuffer which can then be modified.
Such as PreviewConverter::updateMainResource and the LegacyPreviewLoader which will clear the SharedBuffer after being returned (so any references to that SharedBuffer become useless)

We should eliminate this code pattern and have SharedBufferBuilder::get() always return a new SharedBuffer such as a SharedBuffer is really immutable once created.
Comment 1 Radar WebKit Bug Importer 2021-12-14 04:02:16 PST
<rdar://problem/86462307>