[webkit-reviews] review granted: [Bug 228875] SandboxExtension::Handle creation should return std::optional instead of bool : [Attachment 435460] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 13 00:01:04 PDT 2021
youenn fablet <youennf at gmail.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 228875: SandboxExtension::Handle creation should return std::optional
instead of bool
https://bugs.webkit.org/show_bug.cgi?id=228875
Attachment 435460: Patch
https://bugs.webkit.org/attachment.cgi?id=435460&action=review
--- Comment #6 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 435460
--> https://bugs.webkit.org/attachment.cgi?id=435460
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=435460&action=review
> Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:298
> +static SandboxExtension::HandleArray createHandlesForResources(const
Vector<T>& resources, Function<std::optional<SandboxExtension::Handle>(const
T&)>&& createFunction)
Does not seem we need a Function<>&& here.
> Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:319
> + return createHandlesForResources(paths,
Function<std::optional<Handle>(const String&)>([&logLabel] (const String& path)
{
Would it work with:
return createHandlesForResources<String>(paths, [&logLabel](auto& path) { ...
});
> Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:399
> + return createHandlesForResources(services,
Function<std::optional<Handle>(const ASCIILiteral&)>([auditToken, flags] (const
ASCIILiteral& service) -> std::optional<Handle> {
Ditto here, createHandlesForResources<ASCIILiteral>(...) ?
Maybe below as well
More information about the webkit-reviews
mailing list