Bug 296684

Summary: SharedBufferBuilder::take() should return a contiguous SharedBuffer if it only contains a single DataSegment.
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: WebCore Misc.Assignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Jean-Yves Avenard [:jya]
Reported 2025-07-30 01:44:08 PDT
When we create a SharedBufferBuilder and only append a single segment to it, if we later call SharedBufferBuilder::take() what we get is a FragmentedSharedBuffer, it could be a SharedBuffer instead. Which would allow simplification later and remove unnecessary allocation when we then call getAsContiguous() on that SharedBuffer.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-07-30 01:47:36 PDT
Jean-Yves Avenard [:jya]
Comment 2 2025-07-30 21:43:52 PDT
EWS
Comment 3 2025-08-02 08:09:30 PDT
Committed 298168@main (a20b10db9c2d): <https://commits.webkit.org/298168@main> Reviewed commits have been landed. Closing PR #48760 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.