Move SWClientConnection class out of server/ folder
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Nov 2017 23:06:34 +0000 (23:06 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Nov 2017 23:06:34 +0000 (23:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180217

Reviewed by Brady Eidson.

Move SWClientConnection class out of server/ folder since the client connection
lives in the WebProcess, not the Storage process.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* workers/service/SWClientConnection.cpp: Renamed from Source/WebCore/workers/service/server/SWClientConnection.cpp.
(WebCore::SWClientConnection::scheduleJob):
(WebCore::SWClientConnection::finishedFetchingScript):
(WebCore::SWClientConnection::failedFetchingScript):
(WebCore::SWClientConnection::jobRejectedInServer):
(WebCore::SWClientConnection::registrationJobResolvedInServer):
(WebCore::SWClientConnection::unregistrationJobResolvedInServer):
(WebCore::SWClientConnection::startScriptFetchForServer):
(WebCore::SWClientConnection::postMessageToServiceWorkerClient):
(WebCore::SWClientConnection::forEachContainer):
(WebCore::SWClientConnection::updateRegistrationState):
(WebCore::SWClientConnection::updateWorkerState):
(WebCore::SWClientConnection::fireUpdateFoundEvent):
(WebCore::SWClientConnection::notifyClientsOfControllerChange):
* workers/service/SWClientConnection.h: Renamed from Source/WebCore/workers/service/server/SWClientConnection.h.
* workers/service/ServiceWorkerContainer.cpp:

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

Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/workers/service/SWClientConnection.cpp [moved from Source/WebCore/workers/service/server/SWClientConnection.cpp with 100% similarity]
Source/WebCore/workers/service/SWClientConnection.h [moved from Source/WebCore/workers/service/server/SWClientConnection.h with 99% similarity]
Source/WebCore/workers/service/ServiceWorkerContainer.cpp
Source/WebCore/workers/service/server/SWOriginStore.cpp
Source/WebCore/workers/service/server/SWOriginStore.h

index 5f84ef3..0780b39 100644 (file)
@@ -1,5 +1,34 @@
 2017-11-30  Chris Dumez  <cdumez@apple.com>
 
+        Move SWClientConnection class out of server/ folder
+        https://bugs.webkit.org/show_bug.cgi?id=180217
+
+        Reviewed by Brady Eidson.
+
+        Move SWClientConnection class out of server/ folder since the client connection
+        lives in the WebProcess, not the Storage process.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * workers/service/SWClientConnection.cpp: Renamed from Source/WebCore/workers/service/server/SWClientConnection.cpp.
+        (WebCore::SWClientConnection::scheduleJob):
+        (WebCore::SWClientConnection::finishedFetchingScript):
+        (WebCore::SWClientConnection::failedFetchingScript):
+        (WebCore::SWClientConnection::jobRejectedInServer):
+        (WebCore::SWClientConnection::registrationJobResolvedInServer):
+        (WebCore::SWClientConnection::unregistrationJobResolvedInServer):
+        (WebCore::SWClientConnection::startScriptFetchForServer):
+        (WebCore::SWClientConnection::postMessageToServiceWorkerClient):
+        (WebCore::SWClientConnection::forEachContainer):
+        (WebCore::SWClientConnection::updateRegistrationState):
+        (WebCore::SWClientConnection::updateWorkerState):
+        (WebCore::SWClientConnection::fireUpdateFoundEvent):
+        (WebCore::SWClientConnection::notifyClientsOfControllerChange):
+        * workers/service/SWClientConnection.h: Renamed from Source/WebCore/workers/service/server/SWClientConnection.h.
+        * workers/service/ServiceWorkerContainer.cpp:
+
+2017-11-30  Chris Dumez  <cdumez@apple.com>
+
         ServiceWorkerThread's m_extendedEvents gets destroyed on the wrong thread
         https://bugs.webkit.org/show_bug.cgi?id=180216
 
index 91e04e1..8a748d6 100644 (file)
@@ -2175,6 +2175,7 @@ workers/WorkerThread.cpp
 workers/service/ExtendableEvent.cpp
 workers/service/ExtendableMessageEvent.cpp
 workers/service/FetchEvent.cpp
+workers/service/SWClientConnection.cpp
 workers/service/ServiceWorker.cpp
 workers/service/ServiceWorkerClient.cpp
 workers/service/ServiceWorkerClientData.cpp
@@ -2199,7 +2200,6 @@ workers/service/context/ServiceWorkerThread.cpp
 workers/service/context/ServiceWorkerThreadProxy.cpp
 workers/service/context/SWContextManager.cpp
 
-workers/service/server/SWClientConnection.cpp
 workers/service/server/SWOriginStore.cpp
 workers/service/server/SWServer.cpp
 workers/service/server/SWServerJobQueue.cpp
index 1573053..7b3c099 100644 (file)
                46EB37CC1F97CCD200B65523 /* JSServiceWorkerClients.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EB37C51F97CCCB00B65523 /* JSServiceWorkerClients.h */; };
                46EB37CE1F97CCD200B65523 /* JSServiceWorkerWindowClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EB37C71F97CCCB00B65523 /* JSServiceWorkerWindowClient.h */; };
                46EBEA021B7D4D6500BE4941 /* CollectionTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EBEA011B7D4D5D00BE4941 /* CollectionTraversal.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               46ECB6381FD0A3C80088E5AD /* SWClientConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 46ECB6371FD0A3BB0088E5AD /* SWClientConnection.h */; settings = {ATTRIBUTES = (Private, ); }; };
                46EF142A1F97B7D800C2A524 /* ServiceWorkerWindowClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EF14201F97B7BA00C2A524 /* ServiceWorkerWindowClient.h */; };
                46EF142C1F97B7D800C2A524 /* ServiceWorkerClients.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EF14221F97B7BA00C2A524 /* ServiceWorkerClients.h */; };
                46EF142D1F97B7D800C2A524 /* ServiceWorkerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EF14241F97B7BA00C2A524 /* ServiceWorkerClient.h */; };
                5174E20A10A1F44F00F95E6F /* PopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5174E20810A1F44F00F95E6F /* PopStateEvent.h */; };
                51771DFF1BDB485000CAE8E4 /* MemoryObjectStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51771DFD1BDB475600CAE8E4 /* MemoryObjectStore.h */; };
                517A52F01F47535B00DCDC0A /* SWServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A52EE1F47535900DCDC0A /* SWServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               517A531D1F4B53B100DCDC0A /* SWClientConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A52FF1F478CCE00DCDC0A /* SWClientConnection.h */; settings = {ATTRIBUTES = (Private, ); }; };
                517A53291F4B90B900DCDC0A /* ServiceWorkerRegistrationKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A53261F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.h */; settings = {ATTRIBUTES = (Private, ); }; };
                517A53461F50C17F00DCDC0A /* SWServerWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A53421F50C16100DCDC0A /* SWServerWorker.h */; settings = {ATTRIBUTES = (Private, ); }; };
                517A534F1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A534C1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                46EB37C61F97CCCB00B65523 /* JSServiceWorkerWindowClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSServiceWorkerWindowClient.cpp; sourceTree = "<group>"; };
                46EB37C71F97CCCB00B65523 /* JSServiceWorkerWindowClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSServiceWorkerWindowClient.h; sourceTree = "<group>"; };
                46EBEA011B7D4D5D00BE4941 /* CollectionTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionTraversal.h; sourceTree = "<group>"; };
+               46ECB6361FD0A3BB0088E5AD /* SWClientConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SWClientConnection.cpp; sourceTree = "<group>"; };
+               46ECB6371FD0A3BB0088E5AD /* SWClientConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWClientConnection.h; sourceTree = "<group>"; };
                46EF14201F97B7BA00C2A524 /* ServiceWorkerWindowClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerWindowClient.h; sourceTree = "<group>"; };
                46EF14211F97B7BA00C2A524 /* ServiceWorkerClients.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerClients.cpp; sourceTree = "<group>"; };
                46EF14221F97B7BA00C2A524 /* ServiceWorkerClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerClients.h; sourceTree = "<group>"; };
                51771DFD1BDB475600CAE8E4 /* MemoryObjectStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryObjectStore.h; sourceTree = "<group>"; };
                517A52EE1F47535900DCDC0A /* SWServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWServer.h; sourceTree = "<group>"; };
                517A52EF1F47535900DCDC0A /* SWServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SWServer.cpp; sourceTree = "<group>"; };
-               517A52FE1F478CCE00DCDC0A /* SWClientConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SWClientConnection.cpp; sourceTree = "<group>"; };
-               517A52FF1F478CCE00DCDC0A /* SWClientConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWClientConnection.h; sourceTree = "<group>"; };
                517A53241F4B904A00DCDC0A /* ServiceWorkerJobData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerJobData.cpp; sourceTree = "<group>"; };
                517A53261F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerRegistrationKey.h; sourceTree = "<group>"; };
                517A53271F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerRegistrationKey.cpp; sourceTree = "<group>"; };
                517A52EC1F47532D00DCDC0A /* server */ = {
                        isa = PBXGroup;
                        children = (
-                               517A52FE1F478CCE00DCDC0A /* SWClientConnection.cpp */,
-                               517A52FF1F478CCE00DCDC0A /* SWClientConnection.h */,
                                4151E5B91FBA4C7600E47E2D /* SWOriginStore.cpp */,
                                4151E5B71FBA4C7500E47E2D /* SWOriginStore.h */,
                                517A52EF1F47535900DCDC0A /* SWServer.cpp */,
                                46EF14251F97B7BA00C2A524 /* ServiceWorkerWindowClient.cpp */,
                                46EF14201F97B7BA00C2A524 /* ServiceWorkerWindowClient.h */,
                                46EF14261F97B7BA00C2A524 /* ServiceWorkerWindowClient.idl */,
+                               46ECB6361FD0A3BB0088E5AD /* SWClientConnection.cpp */,
+                               46ECB6371FD0A3BB0088E5AD /* SWClientConnection.h */,
                        );
                        path = service;
                        sourceTree = "<group>";
                                B51A2F3F17D7D3AE0072517A /* ImageQualityController.h in Headers */,
                                49291E4B134172C800E753DE /* ImageRenderingMode.h in Headers */,
                                7C193BC11F5E0EED0088F3E6 /* ImageSmoothingQuality.h in Headers */,
-                               B27535710B053814002CE64F /* ImageSource.h in Headers */,
                                4B3480940EEF50D400AC1B41 /* ImageSourceCG.h in Headers */,
                                5550CB421E955E3C00111AA0 /* ImageTypes.h in Headers */,
                                26F756B31B3B66F70005DD79 /* ImmutableNFA.h in Headers */,
                                8485228B1190173C006EDC7F /* SVGVKernElement.h in Headers */,
                                B2227AF60D00BF220071B782 /* SVGZoomAndPan.h in Headers */,
                                B2E4EC980D00C22B00432643 /* SVGZoomEvent.h in Headers */,
-                               517A531D1F4B53B100DCDC0A /* SWClientConnection.h in Headers */,
+                               46ECB6381FD0A3C80088E5AD /* SWClientConnection.h in Headers */,
                                46658DC91FA24B8700F7DD54 /* SWContextManager.h in Headers */,
                                4151E5BB1FBA4C7A00E47E2D /* SWOriginStore.h in Headers */,
                                517A52F01F47535B00DCDC0A /* SWServer.h in Headers */,
@@ -30,6 +30,7 @@
 #include "DocumentIdentifier.h"
 #include "ServiceWorkerJob.h"
 #include "ServiceWorkerTypes.h"
+#include <wtf/CompletionHandler.h>
 #include <wtf/HashMap.h>
 #include <wtf/ThreadSafeRefCounted.h>
 
index 3f29c6b..8beb086 100644 (file)
@@ -28,6 +28,7 @@
 
 #if ENABLE(SERVICE_WORKER)
 
+#include "Event.h"
 #include "EventNames.h"
 #include "Exception.h"
 #include "IDLTypes.h"
index 05ae995..5ea45b9 100644 (file)
@@ -29,7 +29,6 @@
 #if ENABLE(SERVICE_WORKER)
 
 #include "SecurityOrigin.h"
-#include <wtf/text/StringHash.h>
 
 namespace WebCore {
 
index a93aa3f..5847d35 100644 (file)
@@ -28,6 +28,8 @@
 #if ENABLE(SERVICE_WORKER)
 
 #include <wtf/HashMap.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
 
 namespace WebCore {