We should limit the number of service worker registrations available to app-bound domains
<rdar://problem/64717589>
Created attachment 402733 [details] Patch
Comment on attachment 402733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402733&action=review > Source/WebCore/workers/service/server/SWServer.cpp:338 > + completionHandler(m_appBoundDomains.contains(domain) && m_scopeToRegistrationMap.keys().size() < maxRegistrationCount); It seems like this code change also limits full web browsers to three registrations. Is that desired?
Comment on attachment 402733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402733&action=review >> Source/WebCore/workers/service/server/SWServer.cpp:338 >> + completionHandler(m_appBoundDomains.contains(domain) && m_scopeToRegistrationMap.keys().size() < maxRegistrationCount); > > It seems like this code change also limits full web browsers to three registrations. Is that desired? It won't because the completion handler result will only be checked if the entitlement is not present (see SWServer::scheduleJob and SWServer::addRegistrationFromStore). It's a little confusing but we added the check here to prevent the app-bound domains from being read unnecessarily.
Comment on attachment 402733 [details] Patch r=me
Comment on attachment 402733 [details] Patch Thanks!
Committed r263521: <https://trac.webkit.org/changeset/263521> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402733 [details].