Unreviewed, fix tiny mistake in r229615 that caused API tests failures.
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2018 16:17:24 +0000 (16:17 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2018 16:17:24 +0000 (16:17 +0000)
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::addRegistrationFromStore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229625 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/workers/service/server/SWServer.cpp

index 2c2f426..5b897e7 100644 (file)
@@ -1,3 +1,10 @@
+2018-03-15  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed, fix tiny mistake in r229615 that caused API tests failures.
+
+        * workers/service/server/SWServer.cpp:
+        (WebCore::SWServer::addRegistrationFromStore):
+
 2018-03-15  Zan Dobersek  <zdobersek@igalia.com>
 
         [TexMap] Remove TextureMapperLayer::texture()
index 9d3d078..d7b3d8d 100644 (file)
@@ -139,7 +139,7 @@ void SWServer::addRegistrationFromStore(ServiceWorkerContextData&& data)
     addRegistration(WTFMove(registration));
 
     auto* connection = SWServerToContextConnection::globalServerToContextConnection();
-    auto worker = SWServerWorker::create(*this, *registrationPtr, connection ? connection->identifier() : SWServerToContextConnectionIdentifier(), data.scriptURL, data.script, data.contentSecurityPolicy, data.workerType, data.serviceWorkerIdentifier);
+    auto worker = SWServerWorker::create(*this, *registrationPtr, connection ? std::make_optional(connection->identifier()) : std::nullopt, data.scriptURL, data.script, data.contentSecurityPolicy, data.workerType, data.serviceWorkerIdentifier);
     registrationPtr->updateRegistrationState(ServiceWorkerRegistrationState::Active, worker.ptr());
     worker->setState(ServiceWorkerState::Activated);
 }