Diff
Modified: trunk/Source/WebCore/ChangeLog (228690 => 228691)
--- trunk/Source/WebCore/ChangeLog 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebCore/ChangeLog 2018-02-19 16:46:23 UTC (rev 228691)
@@ -1,3 +1,36 @@
+2018-02-19 Ms2ger <[email protected]>
+
+ Explicitly qualify some method calls on this in lamdas in Service Worker code.
+ https://bugs.webkit.org/show_bug.cgi?id=182875
+
+ Reviewed by Chris Dumez.
+
+ This is necessary for the code to build with GCC 5. Other code already
+ appears to have been adapted similarly.
+
+ No change in functionality.
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::redirectReceived):
+ (WebCore::DocumentLoader::startLoadingMainResource):
+ * workers/service/ServiceWorkerContainer.cpp:
+ (WebCore::ServiceWorkerContainer::ready):
+ (WebCore::ServiceWorkerContainer::getRegistration):
+ (WebCore::ServiceWorkerContainer::getRegistrations):
+ (WebCore::ServiceWorkerContainer::didFinishGetRegistrationsRequest):
+ * workers/service/ServiceWorkerGlobalScope.cpp:
+ (WebCore::ServiceWorkerGlobalScope::updateExtendedEventsSet):
+ * workers/service/server/SWServer.cpp:
+ (WebCore::SWServer::claim):
+ (WebCore::SWServer::Connection::resolveRegistrationReadyRequests):
+ * workers/service/server/SWServerRegistration.cpp:
+ (WebCore::SWServerRegistration::updateRegistrationState):
+ (WebCore::SWServerRegistration::setUpdateViaCache):
+ (WebCore::SWServerRegistration::setLastUpdateTime):
+ (WebCore::SWServerRegistration::fireUpdateFoundEvent):
+ * workers/service/server/SWServerWorker.cpp:
+ (WebCore::SWServerWorker::setState):
+
2018-02-19 Zalan Bujtas <[email protected]>
[RenderTreeBuilder] Move RenderElement::removeAndDestroyChild() to RenderTreeBuilder
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (228690 => 228691)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2018-02-19 16:46:23 UTC (rev 228691)
@@ -524,7 +524,7 @@
return;
}
auto url = ""
- matchRegistration(url, [request = WTFMove(request), isRedirectionFromServiceWorker, completionHandler = WTFMove(completionHandler), protectedThis = WTFMove(protectedThis), this] (auto&& registrationData) mutable {
+ this->matchRegistration(url, [request = WTFMove(request), isRedirectionFromServiceWorker, completionHandler = WTFMove(completionHandler), protectedThis = WTFMove(protectedThis), this] (auto&& registrationData) mutable {
if (!m_mainDocumentError.isNull() || !m_frame) {
completionHandler({ });
return;
@@ -538,11 +538,11 @@
}
// Service worker registration changed, we need to cancel the current load to restart a new one.
- clearMainResource();
+ this->clearMainResource();
completionHandler({ });
m_serviceWorkerRegistrationData = WTFMove(registrationData);
- loadMainResource(WTFMove(request));
+ this->loadMainResource(WTFMove(request));
return;
});
});
@@ -1655,7 +1655,7 @@
return;
m_serviceWorkerRegistrationData = WTFMove(registrationData);
- loadMainResource(WTFMove(request));
+ this->loadMainResource(WTFMove(request));
});
#else
loadMainResource(WTFMove(request));
Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (228690 => 228691)
--- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp 2018-02-19 16:46:23 UTC (rev 228691)
@@ -94,10 +94,10 @@
callOnMainThread([this, connection = makeRef(ensureSWClientConnection()), topOrigin = context.topOrigin().isolatedCopy(), clientURL = context.url().isolatedCopy(), contextIdentifier]() mutable {
connection->whenRegistrationReady(topOrigin, clientURL, [this, contextIdentifier](auto&& registrationData) {
ScriptExecutionContext::postTaskTo(contextIdentifier, [this, registrationData = crossThreadCopy(registrationData)](auto&) mutable {
- if (m_isStopped || !scriptExecutionContext()->sessionID().isValid())
+ if (m_isStopped || !this->scriptExecutionContext()->sessionID().isValid())
return;
- auto registration = ServiceWorkerRegistration::getOrCreate(*scriptExecutionContext(), *this, WTFMove(registrationData));
+ auto registration = ServiceWorkerRegistration::getOrCreate(*this->scriptExecutionContext(), *this, WTFMove(registrationData));
m_readyPromise->resolve(WTFMove(registration));
});
});
@@ -269,7 +269,7 @@
callOnMainThread([connection = makeRef(ensureSWClientConnection()), this, topOrigin = context->topOrigin().isolatedCopy(), parsedURL = parsedURL.isolatedCopy(), contextIdentifier, pendingPromiseIdentifier]() mutable {
connection->matchRegistration(topOrigin, parsedURL, [this, contextIdentifier, pendingPromiseIdentifier] (auto&& result) mutable {
ScriptExecutionContext::postTaskTo(contextIdentifier, [this, pendingPromiseIdentifier, result = crossThreadCopy(result)](ScriptExecutionContext&) mutable {
- didFinishGetRegistrationRequest(pendingPromiseIdentifier, WTFMove(result));
+ this->didFinishGetRegistrationRequest(pendingPromiseIdentifier, WTFMove(result));
});
});
});
@@ -332,7 +332,7 @@
callOnMainThread([connection = makeRef(ensureSWClientConnection()), this, topOrigin = context->topOrigin().isolatedCopy(), contextURL = contextURL.isolatedCopy(), contextIdentifier, pendingPromiseIdentifier]() mutable {
connection->getRegistrations(topOrigin, contextURL, [this, contextIdentifier, pendingPromiseIdentifier] (auto&& registrationDatas) mutable {
ScriptExecutionContext::postTaskTo(contextIdentifier, [this, pendingPromiseIdentifier, registrationDatas = crossThreadCopy(registrationDatas)](ScriptExecutionContext&) mutable {
- didFinishGetRegistrationsRequest(pendingPromiseIdentifier, WTFMove(registrationDatas));
+ this->didFinishGetRegistrationsRequest(pendingPromiseIdentifier, WTFMove(registrationDatas));
});
});
});
@@ -354,7 +354,7 @@
}
auto registrations = WTF::map(WTFMove(registrationDatas), [&] (auto&& registrationData) {
- return ServiceWorkerRegistration::getOrCreate(*scriptExecutionContext(), *this, WTFMove(registrationData));
+ return ServiceWorkerRegistration::getOrCreate(*this->scriptExecutionContext(), *this, WTFMove(registrationData));
});
pendingPromise->promise->resolve<IDLSequence<IDLInterface<ServiceWorkerRegistration>>>(WTFMove(registrations));
Modified: trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp (228690 => 228691)
--- trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp 2018-02-19 16:46:23 UTC (rev 228691)
@@ -113,7 +113,7 @@
if (newEvent && newEvent->pendingPromiseCount()) {
m_extendedEvents.append(*newEvent);
newEvent->whenAllExtendLifetimePromisesAreSettled([this](auto&&) {
- updateExtendedEventsSet();
+ this->updateExtendedEventsSet();
});
// Clear out the event's target as it is the WorkerGlobalScope and we do not want to keep it
// alive unnecessarily.
Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (228690 => 228691)
--- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebCore/workers/service/server/SWServer.cpp 2018-02-19 16:46:23 UTC (rev 228691)
@@ -443,7 +443,7 @@
{
auto& origin = worker.origin();
forEachClientForOrigin(origin, [&](auto& clientData) {
- auto* registration = doRegistrationMatching(origin.topOrigin, clientData.url);
+ auto* registration = this->doRegistrationMatching(origin.topOrigin, clientData.url);
if (!(registration && registration->key() == worker.registrationKey()))
return;
@@ -453,7 +453,7 @@
if (previousIdentifier == worker.identifier())
return;
result.iterator->value = worker.identifier();
- if (auto* controllingRegistration = registrationFromServiceWorkerIdentifier(previousIdentifier))
+ if (auto* controllingRegistration = this->registrationFromServiceWorkerIdentifier(previousIdentifier))
controllingRegistration->removeClientUsingRegistration(clientData.identifier);
}
registration->controlClient(clientData.identifier);
@@ -824,7 +824,7 @@
if (!registration.key().isMatching(request.topOrigin, request.clientURL))
return false;
- registrationReady(request.identifier, registration.data());
+ this->registrationReady(request.identifier, registration.data());
return true;
});
}
Modified: trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp (228690 => 228691)
--- trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp 2018-02-19 16:46:23 UTC (rev 228691)
@@ -99,7 +99,7 @@
serviceWorkerData = worker->data();
forEachConnection([&](auto& connection) {
- connection.updateRegistrationStateInClient(identifier(), state, serviceWorkerData);
+ connection.updateRegistrationStateInClient(this->identifier(), state, serviceWorkerData);
});
}
@@ -114,7 +114,7 @@
{
m_updateViaCache = updateViaCache;
forEachConnection([&](auto& connection) {
- connection.setRegistrationUpdateViaCache(identifier(), updateViaCache);
+ connection.setRegistrationUpdateViaCache(this->identifier(), updateViaCache);
});
}
@@ -122,7 +122,7 @@
{
m_lastUpdateTime = time;
forEachConnection([&](auto& connection) {
- connection.setRegistrationLastUpdateTime(identifier(), time);
+ connection.setRegistrationLastUpdateTime(this->identifier(), time);
});
}
@@ -129,7 +129,7 @@
void SWServerRegistration::fireUpdateFoundEvent()
{
forEachConnection([&](auto& connection) {
- connection.fireUpdateFoundEvent(identifier());
+ connection.fireUpdateFoundEvent(this->identifier());
});
}
Modified: trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp (228690 => 228691)
--- trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp 2018-02-19 16:46:23 UTC (rev 228691)
@@ -179,7 +179,7 @@
ASSERT(registration || state == ServiceWorkerState::Redundant);
if (registration) {
registration->forEachConnection([&](auto& connection) {
- connection.updateWorkerStateInClient(identifier(), state);
+ connection.updateWorkerStateInClient(this->identifier(), state);
});
}
Modified: trunk/Source/WebKit/ChangeLog (228690 => 228691)
--- trunk/Source/WebKit/ChangeLog 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebKit/ChangeLog 2018-02-19 16:46:23 UTC (rev 228691)
@@ -1,3 +1,16 @@
+2018-02-19 Ms2ger <[email protected]>
+
+ Explicitly qualify some method calls on this in lamdas in Service Worker code.
+ https://bugs.webkit.org/show_bug.cgi?id=182875
+
+ Reviewed by Chris Dumez.
+
+ This is necessary for the code to build with GCC 5. Other code already
+ appears to have been adapted similarly.
+
+ * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
+ (WebKit::WebSWServerConnection::startFetch):
+
2018-02-18 Reza Abbasian <[email protected]>
Set the appropriate AutoFill context for suggested passwords.
Modified: trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp (228690 => 228691)
--- trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp 2018-02-19 16:16:10 UTC (rev 228690)
+++ trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp 2018-02-19 16:46:23 UTC (rev 228691)
@@ -158,7 +158,7 @@
if (success) {
SWSERVERCONNECTION_RELEASE_LOG_IF_ALLOWED("startFetch: Starting fetch %llu via service worker %llu", fetchIdentifier, serviceWorkerIdentifier.toUInt64());
- sendToContextProcess(contextConnection, Messages::WebSWContextManagerConnection::StartFetch { identifier(), fetchIdentifier, serviceWorkerIdentifier, request, options, formData, referrer });
+ sendToContextProcess(contextConnection, Messages::WebSWContextManagerConnection::StartFetch { this->identifier(), fetchIdentifier, serviceWorkerIdentifier, request, options, formData, referrer });
} else {
SWSERVERCONNECTION_RELEASE_LOG_ERROR_IF_ALLOWED("startFetch: fetchIdentifier: %llu -> DidNotHandle because failed to run service worker", fetchIdentifier);
m_contentConnection->send(Messages::ServiceWorkerClientFetch::DidNotHandle { }, fetchIdentifier);