Changeset 228691 in webkit
- Timestamp:
- Feb 19, 2018 8:46:23 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r228683 r228691 1 2018-02-19 Ms2ger <Ms2ger@igalia.com> 2 3 Explicitly qualify some method calls on this in lamdas in Service Worker code. 4 https://bugs.webkit.org/show_bug.cgi?id=182875 5 6 Reviewed by Chris Dumez. 7 8 This is necessary for the code to build with GCC 5. Other code already 9 appears to have been adapted similarly. 10 11 No change in functionality. 12 13 * loader/DocumentLoader.cpp: 14 (WebCore::DocumentLoader::redirectReceived): 15 (WebCore::DocumentLoader::startLoadingMainResource): 16 * workers/service/ServiceWorkerContainer.cpp: 17 (WebCore::ServiceWorkerContainer::ready): 18 (WebCore::ServiceWorkerContainer::getRegistration): 19 (WebCore::ServiceWorkerContainer::getRegistrations): 20 (WebCore::ServiceWorkerContainer::didFinishGetRegistrationsRequest): 21 * workers/service/ServiceWorkerGlobalScope.cpp: 22 (WebCore::ServiceWorkerGlobalScope::updateExtendedEventsSet): 23 * workers/service/server/SWServer.cpp: 24 (WebCore::SWServer::claim): 25 (WebCore::SWServer::Connection::resolveRegistrationReadyRequests): 26 * workers/service/server/SWServerRegistration.cpp: 27 (WebCore::SWServerRegistration::updateRegistrationState): 28 (WebCore::SWServerRegistration::setUpdateViaCache): 29 (WebCore::SWServerRegistration::setLastUpdateTime): 30 (WebCore::SWServerRegistration::fireUpdateFoundEvent): 31 * workers/service/server/SWServerWorker.cpp: 32 (WebCore::SWServerWorker::setState): 33 1 34 2018-02-19 Zalan Bujtas <zalan@apple.com> 2 35 -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r228591 r228691 525 525 } 526 526 auto url = request.url(); 527 matchRegistration(url, [request = WTFMove(request), isRedirectionFromServiceWorker, completionHandler = WTFMove(completionHandler), protectedThis = WTFMove(protectedThis), this] (auto&& registrationData) mutable {527 this->matchRegistration(url, [request = WTFMove(request), isRedirectionFromServiceWorker, completionHandler = WTFMove(completionHandler), protectedThis = WTFMove(protectedThis), this] (auto&& registrationData) mutable { 528 528 if (!m_mainDocumentError.isNull() || !m_frame) { 529 529 completionHandler({ }); … … 539 539 540 540 // Service worker registration changed, we need to cancel the current load to restart a new one. 541 clearMainResource();541 this->clearMainResource(); 542 542 completionHandler({ }); 543 543 544 544 m_serviceWorkerRegistrationData = WTFMove(registrationData); 545 loadMainResource(WTFMove(request));545 this->loadMainResource(WTFMove(request)); 546 546 return; 547 547 }); … … 1656 1656 1657 1657 m_serviceWorkerRegistrationData = WTFMove(registrationData); 1658 loadMainResource(WTFMove(request));1658 this->loadMainResource(WTFMove(request)); 1659 1659 }); 1660 1660 #else -
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp
r228101 r228691 95 95 connection->whenRegistrationReady(topOrigin, clientURL, [this, contextIdentifier](auto&& registrationData) { 96 96 ScriptExecutionContext::postTaskTo(contextIdentifier, [this, registrationData = crossThreadCopy(registrationData)](auto&) mutable { 97 if (m_isStopped || ! scriptExecutionContext()->sessionID().isValid())97 if (m_isStopped || !this->scriptExecutionContext()->sessionID().isValid()) 98 98 return; 99 99 100 auto registration = ServiceWorkerRegistration::getOrCreate(* scriptExecutionContext(), *this, WTFMove(registrationData));100 auto registration = ServiceWorkerRegistration::getOrCreate(*this->scriptExecutionContext(), *this, WTFMove(registrationData)); 101 101 m_readyPromise->resolve(WTFMove(registration)); 102 102 }); … … 270 270 connection->matchRegistration(topOrigin, parsedURL, [this, contextIdentifier, pendingPromiseIdentifier] (auto&& result) mutable { 271 271 ScriptExecutionContext::postTaskTo(contextIdentifier, [this, pendingPromiseIdentifier, result = crossThreadCopy(result)](ScriptExecutionContext&) mutable { 272 didFinishGetRegistrationRequest(pendingPromiseIdentifier, WTFMove(result));272 this->didFinishGetRegistrationRequest(pendingPromiseIdentifier, WTFMove(result)); 273 273 }); 274 274 }); … … 333 333 connection->getRegistrations(topOrigin, contextURL, [this, contextIdentifier, pendingPromiseIdentifier] (auto&& registrationDatas) mutable { 334 334 ScriptExecutionContext::postTaskTo(contextIdentifier, [this, pendingPromiseIdentifier, registrationDatas = crossThreadCopy(registrationDatas)](ScriptExecutionContext&) mutable { 335 didFinishGetRegistrationsRequest(pendingPromiseIdentifier, WTFMove(registrationDatas));335 this->didFinishGetRegistrationsRequest(pendingPromiseIdentifier, WTFMove(registrationDatas)); 336 336 }); 337 337 }); … … 355 355 356 356 auto registrations = WTF::map(WTFMove(registrationDatas), [&] (auto&& registrationData) { 357 return ServiceWorkerRegistration::getOrCreate(* scriptExecutionContext(), *this, WTFMove(registrationData));357 return ServiceWorkerRegistration::getOrCreate(*this->scriptExecutionContext(), *this, WTFMove(registrationData)); 358 358 }); 359 359 -
trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp
r226628 r228691 114 114 m_extendedEvents.append(*newEvent); 115 115 newEvent->whenAllExtendLifetimePromisesAreSettled([this](auto&&) { 116 updateExtendedEventsSet();116 this->updateExtendedEventsSet(); 117 117 }); 118 118 // Clear out the event's target as it is the WorkerGlobalScope and we do not want to keep it -
trunk/Source/WebCore/workers/service/server/SWServer.cpp
r228180 r228691 444 444 auto& origin = worker.origin(); 445 445 forEachClientForOrigin(origin, [&](auto& clientData) { 446 auto* registration = doRegistrationMatching(origin.topOrigin, clientData.url);446 auto* registration = this->doRegistrationMatching(origin.topOrigin, clientData.url); 447 447 if (!(registration && registration->key() == worker.registrationKey())) 448 448 return; … … 454 454 return; 455 455 result.iterator->value = worker.identifier(); 456 if (auto* controllingRegistration = registrationFromServiceWorkerIdentifier(previousIdentifier))456 if (auto* controllingRegistration = this->registrationFromServiceWorkerIdentifier(previousIdentifier)) 457 457 controllingRegistration->removeClientUsingRegistration(clientData.identifier); 458 458 } … … 825 825 return false; 826 826 827 registrationReady(request.identifier, registration.data());827 this->registrationReady(request.identifier, registration.data()); 828 828 return true; 829 829 }); -
trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp
r228101 r228691 100 100 101 101 forEachConnection([&](auto& connection) { 102 connection.updateRegistrationStateInClient( identifier(), state, serviceWorkerData);102 connection.updateRegistrationStateInClient(this->identifier(), state, serviceWorkerData); 103 103 }); 104 104 } … … 115 115 m_updateViaCache = updateViaCache; 116 116 forEachConnection([&](auto& connection) { 117 connection.setRegistrationUpdateViaCache( identifier(), updateViaCache);117 connection.setRegistrationUpdateViaCache(this->identifier(), updateViaCache); 118 118 }); 119 119 } … … 123 123 m_lastUpdateTime = time; 124 124 forEachConnection([&](auto& connection) { 125 connection.setRegistrationLastUpdateTime( identifier(), time);125 connection.setRegistrationLastUpdateTime(this->identifier(), time); 126 126 }); 127 127 } … … 130 130 { 131 131 forEachConnection([&](auto& connection) { 132 connection.fireUpdateFoundEvent( identifier());132 connection.fireUpdateFoundEvent(this->identifier()); 133 133 }); 134 134 } -
trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp
r227696 r228691 180 180 if (registration) { 181 181 registration->forEachConnection([&](auto& connection) { 182 connection.updateWorkerStateInClient( identifier(), state);182 connection.updateWorkerStateInClient(this->identifier(), state); 183 183 }); 184 184 } -
trunk/Source/WebKit/ChangeLog
r228605 r228691 1 2018-02-19 Ms2ger <Ms2ger@igalia.com> 2 3 Explicitly qualify some method calls on this in lamdas in Service Worker code. 4 https://bugs.webkit.org/show_bug.cgi?id=182875 5 6 Reviewed by Chris Dumez. 7 8 This is necessary for the code to build with GCC 5. Other code already 9 appears to have been adapted similarly. 10 11 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: 12 (WebKit::WebSWServerConnection::startFetch): 13 1 14 2018-02-18 Reza Abbasian <rabbasian@apple.com> 2 15 -
trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp
r227989 r228691 159 159 if (success) { 160 160 SWSERVERCONNECTION_RELEASE_LOG_IF_ALLOWED("startFetch: Starting fetch %llu via service worker %llu", fetchIdentifier, serviceWorkerIdentifier.toUInt64()); 161 sendToContextProcess(contextConnection, Messages::WebSWContextManagerConnection::StartFetch { identifier(), fetchIdentifier, serviceWorkerIdentifier, request, options, formData, referrer });161 sendToContextProcess(contextConnection, Messages::WebSWContextManagerConnection::StartFetch { this->identifier(), fetchIdentifier, serviceWorkerIdentifier, request, options, formData, referrer }); 162 162 } else { 163 163 SWSERVERCONNECTION_RELEASE_LOG_ERROR_IF_ALLOWED("startFetch: fetchIdentifier: %llu -> DidNotHandle because failed to run service worker", fetchIdentifier);
Note: See TracChangeset
for help on using the changeset viewer.