[webkit-reviews] review granted: [Bug 211739] [iOS] Rebuild MobileGestalt cache if needed : [Attachment 399129] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 12 10:43:17 PDT 2020
Darin Adler <darin at apple.com> has granted Per Arne Vollan <pvollan at apple.com>'s
request for review:
Bug 211739: [iOS] Rebuild MobileGestalt cache if needed
https://bugs.webkit.org/show_bug.cgi?id=211739
Attachment 399129: Patch
https://bugs.webkit.org/attachment.cgi?id=399129&action=review
--- Comment #16 from Darin Adler <darin at apple.com> ---
Comment on attachment 399129
--> https://bugs.webkit.org/attachment.cgi?id=399129
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=399129&action=review
> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:125
> +SOFT_LINK_LIBRARY(libMobileGestalt)
> +SOFT_LINK_CLASS(libMobileGestalt, MobileGestaltHelperProxy);
> +SOFT_LINK(libMobileGestalt, _MGCacheValid, bool, (), ());
I just noticed that both the WebCore and WebKitLegacy frameworks already link
to MobileGestalt (WK_MOBILE_GESTALT_LDFLAGS). So even after all this
conversation, I am not sure that it’s super-valuable to do soft linking instead
for the WebKit framework.
> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:129
> + at interface MobileGestaltHelperProxy : NSObject
> +- (BOOL) proxyRebuildCache;
> + at end
Best practice is to put this in MobileGestaltSPI.h header in PAL instead of
here.
> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:494
> + auto proxy = adoptNS([allocMobileGestaltHelperProxyInstance()
init]);
> + [proxy proxyRebuildCache];
Could even consider doing this as a one-liner.
More information about the webkit-reviews
mailing list