[Webkit-unassigned] [Bug 264971] New: ScriptBuffer append with empty string adds empty segment
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 16 11:58:59 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=264971
Bug ID: 264971
Summary: ScriptBuffer append with empty string adds empty
segment
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore JavaScript
Assignee: webkit-unassigned at lists.webkit.org
Reporter: cris.tinel.gaming at gmail.com
ScriptBufferSourceProvider sometimes receives a ScriptBuffer with 2 data segments where 2nd segment is empty (size 0, buffer null). The 2nd empty segment was likely added in WorkerScriptLoader::didFinishLoading by append(decoder->flush()) where flush can return an empty string.
ScriptBufferSourceProvider will call makeContiguous on scriptBuffer which for the above case end up making an unnecessary copy and this memory is kept alive by ScriptBufferSourceProvider thus increasing memory usage.
ScriptBuffer should not add an empty segment to the buffer when append is called with empty string.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231116/0d32f3b6/attachment-0001.htm>
More information about the webkit-unassigned
mailing list