[webkit-reviews] review granted: [Bug 211100] [MacCatalyst] Dynamic access to accessibility services is incomplete : [Attachment 397753] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 27 15:55:25 PDT 2020
Darin Adler <darin at apple.com> has granted Brent Fulgham <bfulgham at webkit.org>'s
request for review:
Bug 211100: [MacCatalyst] Dynamic access to accessibility services is
incomplete
https://bugs.webkit.org/show_bug.cgi?id=211100
Attachment 397753: Patch
https://bugs.webkit.org/attachment.cgi?id=397753&action=review
--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 397753
--> https://bugs.webkit.org/attachment.cgi?id=397753
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=397753&action=review
> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:461
> + static const char* services[] = {
Can make this more const like this:
static constexpr const char* services [] {
The other way would result in less efficient code.
> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:467
> + auto size = WTF_ARRAY_LENGTH(services);
Don’t need WTF_ARRAY_LENGTH any more in modern C++:
auto size = std::size(services);
> Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm:254
> + SandboxExtension::HandleArray handleArray;
> + static const char* services[] = {
> +#if PLATFORM(MACCATALYST)
> + "com.apple.cfprefsd.agent",
> +#endif
> + "com.apple.cfprefsd.daemon"
> + };
> + auto size = WTF_ARRAY_LENGTH(services);
> + handleArray.allocate(size);
> + for (size_t i = 0; i < size; ++i) {
> + if (!SandboxExtension::createHandleForMachLookup(services[i],
connection() ? connection()->getAuditToken() : WTF::nullopt, handleArray[i]))
> + return;
> + }
Can we share this code? Comments above still apply.
More information about the webkit-reviews
mailing list