Bug 233511
| Summary: | Investigate if ScriptBufferSourceProvider could do without having to flatten underlying SharedBuffer | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=233030 https://bugs.webkit.org/show_bug.cgi?id=234215 |
||
Jean-Yves Avenard [:jya]
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/86003855>