[webkit-reviews] review granted: [Bug 237730] Allow modification of content of StreamClientConnection.streamBuffer in IPCTestingAPI : [Attachment 454796] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 17 04:56:30 PDT 2022


Kimmo Kinnunen <kkinnunen at apple.com> has granted Simon Lewis
<simon.lewis at apple.com>'s request for review:
Bug 237730: Allow modification of content of
StreamClientConnection.streamBuffer in IPCTestingAPI
https://bugs.webkit.org/show_bug.cgi?id=237730

Attachment 454796: Patch

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




--- Comment #7 from Kimmo Kinnunen <kkinnunen at apple.com> ---
Comment on attachment 454796
  --> https://bugs.webkit.org/attachment.cgi?id=454796
Patch

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

Looks great still.
Feel free to consider the suggestion. If you do the change, you can also
replace the "Reviewed by OOOPS" with Reviewed by Kimmo Kinnunen", and set the
cq+ to commit.
for such patch, you can upload it by doing:

EDITOR=true tools/Scripts/webkit-patch upload -g HEAD	--no-confirm
--no-review -m "For landing" --check-oops

> Source/WebKit/Platform/IPC/StreamConnectionBuffer.cpp:110
> +    return { static_cast<uint8_t*>((uint8_t*)m_sharedMemory->data() +
headerSize()), m_sharedMemory->size() - headerSize() };

this contains a c-style cast.
I think you could write this as

  return { data(), dataSize() };

or if you want to be pedantic about possibly stuffing stuff into the
(potential) page rounding leftover space and test that it's not used wrong:

 return { data(), m_sharedMemory->size() - headerSize() };


More information about the webkit-reviews mailing list