[webkit-reviews] review granted: [Bug 180854] Replace SandboxExtension::HandleArray with Vector<SandboxExtension::Handle> : [Attachment 329427] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 14 18:01:19 PST 2017


Joseph Pecoraro <joepeck at webkit.org> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 180854: Replace SandboxExtension::HandleArray with
Vector<SandboxExtension::Handle>
https://bugs.webkit.org/show_bug.cgi?id=180854

Attachment 329427: Patch

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




--- Comment #2 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 329427
  --> https://bugs.webkit.org/attachment.cgi?id=329427
Patch

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

r=me, nice!

> Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp:58
> +	   Vector<SandboxExtension::Handle> requestBodySandboxExtensions;
> +	   requestBodySandboxExtensions.resize(fileCount);

Can this `resize` be `reserveInitialCapacity`? In fact there are about 10
occurrences in this change that look like this. I think reserveInitialCapacity
reads better given the intention.

> Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:97
> +    fileUploadHandles.resize(files.size());

This one may need to stay resize because we can't be sure a client didn't
modify the incoming vector.


More information about the webkit-reviews mailing list