Investigate if ScriptBufferSourceProvider could do without having to flatten underlying SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=233511
Summary Investigate if ScriptBufferSourceProvider could do without having to flatten ...
Jean-Yves Avenard [:jya]
Reported 2021-11-25 22:04:32 PST
Seen in https://bugs.webkit.org/show_bug.cgi?id=233030#c13 ScriptBufferSourceProvider wraps a ScriptBuffer and ScriptBufferSourceProvider::source() flatten that ScriptBuffer's SharedBuffer to access the raw content and use this information to return a StringView. A StringView is non-owning requiring ScriptBufferSourceProvider to take an extra reference to the flatten SharedBuffer so we have the content held in both the ScriptBuffer (non-flattened) and in ScriptBufferSourceProvider (flattened) Ideally, we would have StringView keep a raw reference to the SharedBuffer and use SharedBuffer:read() to access the content when needed on demand. Depends on the requirements: speed vs memory cost.
Attachments
Radar WebKit Bug Importer
Comment 1 2021-12-02 22:05:24 PST
Note You need to log in before you can comment on or make changes to this bug.