[webkit-reviews] review granted: [Bug 226857] Fix some inefficient uses of SharedBuffer : [Attachment 431025] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 9 18:22:24 PDT 2021


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 226857: Fix some inefficient uses of SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=226857

Attachment 431025: Patch

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




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

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

> Source/WebCore/platform/SharedBuffer.h:103
> +    Vector<uint8_t> dataAsVector() { return { data(), size() }; }

This should have the word "copy" in its name.

> Source/WebCore/platform/SharedBuffer.h:188
> +    void forEachSegment(const Function<void(const uint8_t*, size_t)>&)
const;

This should use a Span as the argument.

> Source/WebCore/platform/SharedBuffer.h:189
> +    bool startsWith(const uint8_t* prefix, size_t prefixSize) const;

This should use a Span as the argument.


More information about the webkit-reviews mailing list