Title: [229149] trunk/Source/WebCore
Revision
229149
Author
[email protected]
Date
2018-03-01 15:14:45 -0800 (Thu, 01 Mar 2018)

Log Message

SWServer::removeClientServiceWorkerRegistration should not log an error if there is no registration
https://bugs.webkit.org/show_bug.cgi?id=183248

Patch by Youenn Fablet <[email protected]> on 2018-03-01
Reviewed by Chris Dumez.

No change of behavior.
Removed the error logging.
As can be seen from running api and layout tests, a web process can ask a registration to be unregistered
and by the time it goes to the StorageProcess, the registration is already cleared.

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::removeClientServiceWorkerRegistration):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (229148 => 229149)


--- trunk/Source/WebCore/ChangeLog	2018-03-01 23:11:46 UTC (rev 229148)
+++ trunk/Source/WebCore/ChangeLog	2018-03-01 23:14:45 UTC (rev 229149)
@@ -1,3 +1,18 @@
+2018-03-01  Youenn Fablet  <[email protected]>
+
+        SWServer::removeClientServiceWorkerRegistration should not log an error if there is no registration
+        https://bugs.webkit.org/show_bug.cgi?id=183248
+
+        Reviewed by Chris Dumez.
+
+        No change of behavior.
+        Removed the error logging.
+        As can be seen from running api and layout tests, a web process can ask a registration to be unregistered
+        and by the time it goes to the StorageProcess, the registration is already cleared.
+
+        * workers/service/server/SWServer.cpp:
+        (WebCore::SWServer::removeClientServiceWorkerRegistration):
+
 2018-03-01  Daniel Bates  <[email protected]>
 
         CSS ::selection stroke-color and stroke-width are not applied to selected text in text fields

Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (229148 => 229149)


--- trunk/Source/WebCore/workers/service/server/SWServer.cpp	2018-03-01 23:11:46 UTC (rev 229148)
+++ trunk/Source/WebCore/workers/service/server/SWServer.cpp	2018-03-01 23:14:45 UTC (rev 229149)
@@ -481,13 +481,8 @@
 
 void SWServer::removeClientServiceWorkerRegistration(Connection& connection, ServiceWorkerRegistrationIdentifier identifier)
 {
-    auto* registration = m_registrationsByID.get(identifier);
-    if (!registration) {
-        LOG_ERROR("Request to remove client-side ServiceWorkerRegistration from non-existent server-side registration");
-        return;
-    }
-    
-    registration->removeClientServiceWorkerRegistration(connection.identifier());
+    if (auto* registration = m_registrationsByID.get(identifier))
+        registration->removeClientServiceWorkerRegistration(connection.identifier());
 }
 
 void SWServer::updateWorker(Connection&, const ServiceWorkerJobDataIdentifier& jobDataIdentifier, SWServerRegistration& registration, const URL& url, const String& script, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicy, WorkerType type)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to