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

Log Message

Cherry-pick r227967. rdar://problem/37145562

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (228060 => 228061)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-05 02:18:56 UTC (rev 228060)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-05 02:18:58 UTC (rev 228061)
@@ -1,5 +1,32 @@
 2018-02-04  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r227967. rdar://problem/37145562
+
+    2018-02-01  Chris Dumez  <cdu...@apple.com>
+
+            We no longer need to queue service worker jobs until the connection to the service worker process has been established
+            https://bugs.webkit.org/show_bug.cgi?id=182375
+
+            Reviewed by Youenn Fablet.
+
+            We no longer need to queue service worker jobs until the connection to the service worker process
+            has been established. We initially did this to work around the fact that registrations restored
+            from disk would not have an active worker until the service worker process had been established.
+            However, this issue has been fixed in r227696.
+
+            This is basically a revert of r227220, which is no longer needed after r227696.
+
+            No new tests, initial fix was covered by an API test that still passes.
+
+            * workers/service/server/SWServer.cpp:
+            (WebCore::SWServer::clearAll):
+            (WebCore::SWServer::clear):
+            (WebCore::SWServer::scheduleJob):
+            (WebCore::SWServer::serverToContextConnectionCreated):
+            * workers/service/server/SWServer.h:
+
+2018-02-04  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227959. rdar://problem/37145559
 
     2018-02-01  Chris Dumez  <cdu...@apple.com>

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


--- branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp	2018-02-05 02:18:56 UTC (rev 228060)
+++ branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp	2018-02-05 02:18:58 UTC (rev 228061)
@@ -189,7 +189,6 @@
         m_registrations.begin()->value->clear();
     ASSERT(m_registrationsByID.isEmpty());
     m_pendingContextDatas.clear();
-    m_pendingJobs.clear();
     m_originStore->clearAll();
     m_registrationStore.clearAll(WTFMove(completionHandler));
 }
@@ -210,10 +209,6 @@
         return contextData.registration.key.relatesToOrigin(origin);
     });
 
-    m_pendingJobs.removeAllMatching([&](auto& job) {
-        return job.registrationKey().relatesToOrigin(origin);
-    });
-
     // Calling SWServerRegistration::clear() takes care of updating m_registrations, m_originStore and m_registrationStore.
     for (auto* registration : registrationsToRemove)
         registration->clear();
@@ -269,11 +264,6 @@
 {
     ASSERT(m_connections.contains(jobData.connectionIdentifier()));
 
-    if (!SWServerToContextConnection::globalServerToContextConnection()) {
-        m_pendingJobs.append(WTFMove(jobData));
-        return;
-    }
-
     // FIXME: Per the spec, check if this job is equivalent to the last job on the queue.
     // If it is, stack it along with that job.
 
@@ -485,10 +475,6 @@
         for (auto& callback : item.value)
             callback(success, *connection);
     }
-
-    auto pendingJobs = WTFMove(m_pendingJobs);
-    for (auto& jobData : pendingJobs)
-        scheduleJob(WTFMove(jobData));
 }
 
 void SWServer::installContextData(const ServiceWorkerContextData& data)

Modified: branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.h (228060 => 228061)


--- branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.h	2018-02-05 02:18:56 UTC (rev 228060)
+++ branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.h	2018-02-05 02:18:58 UTC (rev 228061)
@@ -223,7 +223,6 @@
     UniqueRef<SWOriginStore> m_originStore;
     RegistrationStore m_registrationStore;
     Vector<ServiceWorkerContextData> m_pendingContextDatas;
-    Vector<ServiceWorkerJobData> m_pendingJobs;
     HashMap<ServiceWorkerIdentifier, Vector<RunServiceWorkerCallback>> m_serviceWorkerRunRequests;
     PAL::SessionID m_sessionID;
     bool m_importCompleted { false };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to