Bug 234215 - SharedBufferBuilder copy constructor should be deleted
Summary: SharedBufferBuilder copy constructor should be deleted
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 233442
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-12 14:23 PST by Jean-Yves Avenard [:jya]
Modified: 2021-12-19 14:24 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-12 14:23:19 PST
Bug 233442 introduced SharedBufferBuilder ; the aim was to guarantee immutability of a SharedBuffer once created.

As such, copying a SharedBufferBuilder doesn't make much sense or it should make a copy of the underlying SharedBuffer before copying.

This paradigm isn't enforceable due to how ScriptBufferSourceProvider is using a ScriptBuffer which itself contains a SharedBufferBuilder

A ScriptBuffer is a wrapper around a SharedBuffer, designed to makes it clearer what type of data it's dealing with.

We should remove the need for copying a SharedBufferBuilder, or have ScriptBufferSourceProvider::m_scriptBuffer itself made immutable (which is prevented by ServiceWorkerGlobalScope::didSaveScriptsToDisk)
Comment 1 Radar WebKit Bug Importer 2021-12-19 14:24:18 PST
<rdar://problem/86699446>