[webkit-reviews] review granted: [Bug 226674] Optimize a few call sites creating SharedBuffer objects : [Attachment 430640] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 4 21:18:02 PDT 2021


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 226674: Optimize a few call sites creating SharedBuffer objects
https://bugs.webkit.org/show_bug.cgi?id=226674

Attachment 430640: Patch

https://bugs.webkit.org/attachment.cgi?id=430640&action=review




--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 430640
  --> https://bugs.webkit.org/attachment.cgi?id=430640
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430640&action=review

> Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:-1249
> -	   overrideData = SharedBuffer::create(content.utf8().data(),
content.utf8().length());

Wow, we should grep for this mistake, even when it doesn’t involve
SharedBuffer.

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:1651
> +    auto sharedBuffer = SharedBuffer::create(data.data(), data.size());

Seems a little sad that we copy in all these IPC cases. But I guess getting
lifetime right would be tricky if we used more of a data view instead of a
copy.


More information about the webkit-reviews mailing list