Title: [227967] trunk/Source/WebCore
- Revision
- 227967
- Author
- [email protected]
- Date
- 2018-02-01 09:10:18 -0800 (Thu, 01 Feb 2018)
Log Message
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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (227966 => 227967)
--- trunk/Source/WebCore/ChangeLog 2018-02-01 16:04:09 UTC (rev 227966)
+++ trunk/Source/WebCore/ChangeLog 2018-02-01 17:10:18 UTC (rev 227967)
@@ -1,3 +1,26 @@
+2018-02-01 Chris Dumez <[email protected]>
+
+ 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-01 Carlos Garcia Campos <[email protected]>
[GTK] Shift + mouse scroll should scroll horizontally
Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (227966 => 227967)
--- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2018-02-01 16:04:09 UTC (rev 227966)
+++ trunk/Source/WebCore/workers/service/server/SWServer.cpp 2018-02-01 17:10:18 UTC (rev 227967)
@@ -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.
@@ -494,10 +484,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: trunk/Source/WebCore/workers/service/server/SWServer.h (227966 => 227967)
--- trunk/Source/WebCore/workers/service/server/SWServer.h 2018-02-01 16:04:09 UTC (rev 227966)
+++ trunk/Source/WebCore/workers/service/server/SWServer.h 2018-02-01 17:10:18 UTC (rev 227967)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes