Bug 233922

Summary: [meta] Ensure that no SharedBuffer is modified once returned
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: New BugsAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 233442, 233923    
Bug Blocks:    

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>