Title: [228055] branches/safari-605-branch/Source/WebCore
Revision
228055
Author
jmarc...@apple.com
Date
2018-02-04 18:18:40 -0800 (Sun, 04 Feb 2018)

Log Message

Cherry-pick r227932. rdar://problem/37145456

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (228054 => 228055)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-05 02:18:38 UTC (rev 228054)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-05 02:18:40 UTC (rev 228055)
@@ -1,5 +1,21 @@
 2018-02-04  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r227932. rdar://problem/37145456
+
+    2018-01-31  Youenn Fablet  <you...@apple.com>
+
+            Change SWServer::claim to set the iterator value as soon as possible
+            https://bugs.webkit.org/show_bug.cgi?id=182337
+
+            Reviewed by Chris Dumez.
+
+            No change of behavior, this is a "let's go safe way" fix.
+
+            * workers/service/server/SWServer.cpp:
+            (WebCore::SWServer::claim):
+
+2018-02-04  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227926. rdar://problem/37145475
 
     2018-01-31  Ryosuke Niwa  <rn...@webkit.org>

Modified: branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp (228054 => 228055)


--- branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp	2018-02-05 02:18:38 UTC (rev 228054)
+++ branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp	2018-02-05 02:18:40 UTC (rev 228055)
@@ -411,11 +411,12 @@
 
         auto result = m_clientToControllingWorker.add(clientData.identifier, worker.identifier());
         if (!result.isNewEntry) {
-            if (result.iterator->value == worker.identifier())
+            auto previousIdentifier = result.iterator->value;
+            if (previousIdentifier == worker.identifier())
                 return;
-            if (auto* controllingRegistration = registrationFromServiceWorkerIdentifier(result.iterator->value))
+            result.iterator->value = worker.identifier();
+            if (auto* controllingRegistration = registrationFromServiceWorkerIdentifier(previousIdentifier))
                 controllingRegistration->removeClientUsingRegistration(clientData.identifier);
-            result.iterator->value = worker.identifier();
         }
         registration->controlClient(clientData.identifier);
     });
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to