Changeset 228061 in webkit
- Timestamp:
- Feb 4, 2018 6:18:58 PM (6 years ago)
- Location:
- branches/safari-605-branch/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-605-branch/Source/WebCore/ChangeLog
r228060 r228061 1 2018-02-04 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r227967. rdar://problem/37145562 4 5 2018-02-01 Chris Dumez <cdumez@apple.com> 6 7 We no longer need to queue service worker jobs until the connection to the service worker process has been established 8 https://bugs.webkit.org/show_bug.cgi?id=182375 9 10 Reviewed by Youenn Fablet. 11 12 We no longer need to queue service worker jobs until the connection to the service worker process 13 has been established. We initially did this to work around the fact that registrations restored 14 from disk would not have an active worker until the service worker process had been established. 15 However, this issue has been fixed in r227696. 16 17 This is basically a revert of r227220, which is no longer needed after r227696. 18 19 No new tests, initial fix was covered by an API test that still passes. 20 21 * workers/service/server/SWServer.cpp: 22 (WebCore::SWServer::clearAll): 23 (WebCore::SWServer::clear): 24 (WebCore::SWServer::scheduleJob): 25 (WebCore::SWServer::serverToContextConnectionCreated): 26 * workers/service/server/SWServer.h: 27 1 28 2018-02-04 Jason Marcell <jmarcell@apple.com> 2 29 -
branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp
r228055 r228061 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. … … 486 476 callback(success, *connection); 487 477 } 488 489 auto pendingJobs = WTFMove(m_pendingJobs);490 for (auto& jobData : pendingJobs)491 scheduleJob(WTFMove(jobData));492 478 } 493 479 -
branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.h
r227828 r228061 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.