[webkit-reviews] review granted: [Bug 195511] Add a WKContentRuleList variant that uses copied memory instead of mmap'd shared memory for class A containerized apps : [Attachment 364114] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 9 09:45:12 PST 2019


Darin Adler <darin at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 195511: Add a WKContentRuleList variant that uses copied memory instead of
mmap'd shared memory for class A containerized apps
https://bugs.webkit.org/show_bug.cgi?id=195511

Attachment 364114: Patch

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




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

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

> Source/WebKit/Shared/WebCompiledContentRuleListData.cpp:46
> +	   return static_cast<const void*>(sharedMemoryOrBuffer->data());

Surprised that a typecast is needed here. Is there a way to write it without
the static_cast?

> Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp:167
> +    function(reinterpret_cast<const uint8_t*>(data.data()), data.size());

Use of SharedBuffer::data is normally discouraged; instead we try to use
iteration. I suppose, though, that in this case the reasons for that don’t
really apply. Make me wonder about the future of the SharedBuffer interface.


More information about the webkit-reviews mailing list