Changeset 227967 in webkit
- Timestamp:
- Feb 1, 2018 9:10:18 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r227966 r227967 1 2018-02-01 Chris Dumez <cdumez@apple.com> 2 3 We no longer need to queue service worker jobs until the connection to the service worker process has been established 4 https://bugs.webkit.org/show_bug.cgi?id=182375 5 6 Reviewed by Youenn Fablet. 7 8 We no longer need to queue service worker jobs until the connection to the service worker process 9 has been established. We initially did this to work around the fact that registrations restored 10 from disk would not have an active worker until the service worker process had been established. 11 However, this issue has been fixed in r227696. 12 13 This is basically a revert of r227220, which is no longer needed after r227696. 14 15 No new tests, initial fix was covered by an API test that still passes. 16 17 * workers/service/server/SWServer.cpp: 18 (WebCore::SWServer::clearAll): 19 (WebCore::SWServer::clear): 20 (WebCore::SWServer::scheduleJob): 21 (WebCore::SWServer::serverToContextConnectionCreated): 22 * workers/service/server/SWServer.h: 23 1 24 2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com> 2 25 -
trunk/Source/WebCore/workers/service/server/SWServer.cpp
r227932 r227967 190 190 ASSERT(m_registrationsByID.isEmpty()); 191 191 m_pendingContextDatas.clear(); 192 m_pendingJobs.clear();193 192 m_originStore->clearAll(); 194 193 m_registrationStore.clearAll(WTFMove(completionHandler)); … … 211 210 }); 212 211 213 m_pendingJobs.removeAllMatching([&](auto& job) {214 return job.registrationKey().relatesToOrigin(origin);215 });216 217 212 // Calling SWServerRegistration::clear() takes care of updating m_registrations, m_originStore and m_registrationStore. 218 213 for (auto* registration : registrationsToRemove) … … 269 264 { 270 265 ASSERT(m_connections.contains(jobData.connectionIdentifier())); 271 272 if (!SWServerToContextConnection::globalServerToContextConnection()) {273 m_pendingJobs.append(WTFMove(jobData));274 return;275 }276 266 277 267 // FIXME: Per the spec, check if this job is equivalent to the last job on the queue. … … 495 485 callback(success, *connection); 496 486 } 497 498 auto pendingJobs = WTFMove(m_pendingJobs);499 for (auto& jobData : pendingJobs)500 scheduleJob(WTFMove(jobData));501 487 } 502 488 -
trunk/Source/WebCore/workers/service/server/SWServer.h
r227745 r227967 224 224 RegistrationStore m_registrationStore; 225 225 Vector<ServiceWorkerContextData> m_pendingContextDatas; 226 Vector<ServiceWorkerJobData> m_pendingJobs;227 226 HashMap<ServiceWorkerIdentifier, Vector<RunServiceWorkerCallback>> m_serviceWorkerRunRequests; 228 227 PAL::SessionID m_sessionID;
Note: See TracChangeset
for help on using the changeset viewer.