[webkit-reviews] review granted: [Bug 227589] WKWebView javascript injection doesn't work if app includes WKAppBoundDomains : [Attachment 433463] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 15 15:08:50 PDT 2021
Brent Fulgham <bfulgham at webkit.org> has granted Kate Cheney
<katherine_cheney at apple.com>'s request for review:
Bug 227589: WKWebView javascript injection doesn't work if app includes
WKAppBoundDomains
https://bugs.webkit.org/show_bug.cgi?id=227589
Attachment 433463: Patch
https://bugs.webkit.org/attachment.cgi?id=433463&action=review
--- Comment #6 from Brent Fulgham <bfulgham at webkit.org> ---
Comment on attachment 433463
--> https://bugs.webkit.org/attachment.cgi?id=433463
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=433463&action=review
> Source/WebCore/workers/service/server/SWServer.cpp:343
> +static unsigned registrationCount(HashMap<ServiceWorkerRegistrationKey,
WeakPtr<SWServerRegistration>> registrationMap)
If we hit this on a hot code path, we might want to cache the answer and
perhaps update when a new SW is registered or removed.
I'd suggest doing this work in the SWServer::addRegistration and
SWServer::removeRegistration. Then you could use the variable in
validateRegistrationDomain.
It looks like you might need to update the count in
removeFromScopeToRegistrationMap, too, which is weird. I wonder why there is a
separate method for that?
More information about the webkit-reviews
mailing list