[WinCairo] Enable service worker
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Mar 2019 19:58:30 +0000 (19:58 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Mar 2019 19:58:30 +0000 (19:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188318

Reviewed by Youenn Fablet.

.:

* Source/cmake/OptionsWin.cmake:

Source/WebCore:

* WebCorePrefix.h:
* testing/ServiceWorkerInternals.h:
* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::serviceWorkerFailedToTerminate):
* workers/service/context/SWContextManager.h:

Source/WebKit:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::terminateProcess):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* config.h:

Tools:

* DumpRenderTree/DumpRenderTreePrefix.h:
* TestWebKitAPI/PlatformWin.cmake:
* TestWebKitAPI/win/TestWebKitAPIPrefix.h:
* WebKitTestRunner/InjectedBundle/win/TestRunnerInjectedBundlePrefix.h:
* WebKitTestRunner/WebKitTestRunnerPrefix.h:

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

17 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/WebCorePrefix.h
Source/WebCore/testing/ServiceWorkerInternals.h
Source/WebCore/workers/service/context/SWContextManager.cpp
Source/WebCore/workers/service/context/SWContextManager.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h
Source/WebKit/config.h
Source/cmake/OptionsWin.cmake
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTreePrefix.h
Tools/TestWebKitAPI/PlatformWin.cmake
Tools/TestWebKitAPI/win/TestWebKitAPIPrefix.h
Tools/WebKitTestRunner/InjectedBundle/win/TestRunnerInjectedBundlePrefix.h
Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h

index 3386c1e..feae961 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-03-01  Don Olmstead  <don.olmstead@sony.com>
+
+        [WinCairo] Enable service worker
+        https://bugs.webkit.org/show_bug.cgi?id=188318
+
+        Reviewed by Youenn Fablet.
+
+        * Source/cmake/OptionsWin.cmake:
+
 2019-02-28  Don Olmstead  <don.olmstead@sony.com>
 
         [WinCairo] Turn ENABLE_RESOURCE_LOAD_STATISTICS on
index 3617cb8..bf4f5f9 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-01  Don Olmstead  <don.olmstead@sony.com>
+
+        [WinCairo] Enable service worker
+        https://bugs.webkit.org/show_bug.cgi?id=188318
+
+        Reviewed by Youenn Fablet.
+
+        * WebCorePrefix.h:
+        * testing/ServiceWorkerInternals.h:
+        * workers/service/context/SWContextManager.cpp:
+        (WebCore::SWContextManager::serviceWorkerFailedToTerminate):
+        * workers/service/context/SWContextManager.h:
+
 2019-03-01  Sihui Liu  <sihui_liu@apple.com>
 
         Add a quirk for bostongloble.com and latimes.com
index 41bee2c..c5a68ff 100644 (file)
 #endif
 #endif
 
-#if OS(WINDOWS)
+#if PLATFORM(WIN)
 #undef WEBCORE_EXPORT
 #define WEBCORE_EXPORT WTF_EXPORT_DECLARATION
+#undef WEBCORE_TESTSUPPORT_EXPORT
+#define WEBCORE_TESTSUPPORT_EXPORT WTF_EXPORT_DECLARATION
 #else
 #include <pthread.h>
-#endif // OS(WINDOWS)
+#endif // PLATFORM(WIN)
 
 #include <sys/types.h>
 #include <fcntl.h>
index da287e1..01de501 100644 (file)
@@ -37,7 +37,7 @@ class FetchEvent;
 class FetchResponse;
 class ScriptExecutionContext;
 
-class WEBCORE_EXPORT ServiceWorkerInternals : public RefCounted<ServiceWorkerInternals> {
+class WEBCORE_TESTSUPPORT_EXPORT ServiceWorkerInternals : public RefCounted<ServiceWorkerInternals> {
 public:
     static Ref<ServiceWorkerInternals> create(ServiceWorkerIdentifier identifier) { return adoptRef(*new ServiceWorkerInternals { identifier }); }
     ~ServiceWorkerInternals();
index 89a849e..edbc8f9 100644 (file)
@@ -151,7 +151,7 @@ bool SWContextManager::postTaskToServiceWorker(ServiceWorkerIdentifier identifie
     return true;
 }
 
-NO_RETURN_DUE_TO_CRASH void SWContextManager::serviceWorkerFailedToTerminate(ServiceWorkerIdentifier serviceWorkerIdentifier)
+void SWContextManager::serviceWorkerFailedToTerminate(ServiceWorkerIdentifier serviceWorkerIdentifier)
 {
     UNUSED_PARAM(serviceWorkerIdentifier);
     RELEASE_LOG_ERROR(ServiceWorker, "Failed to terminate service worker with identifier %s, killing the service worker process", serviceWorkerIdentifier.loggingString().utf8().data());
index f97ee6a..7607a86 100644 (file)
@@ -87,7 +87,7 @@ private:
     SWContextManager() = default;
 
     void startedServiceWorker(Optional<ServiceWorkerJobDataIdentifier>, ServiceWorkerIdentifier, const String& exceptionMessage);
-    void serviceWorkerFailedToTerminate(ServiceWorkerIdentifier);
+    NO_RETURN_DUE_TO_CRASH void serviceWorkerFailedToTerminate(ServiceWorkerIdentifier);
 
     HashMap<ServiceWorkerIdentifier, RefPtr<ServiceWorkerThreadProxy>> m_workerMap;
     std::unique_ptr<Connection> m_connection;
index 7caa031..b4cf318 100644 (file)
@@ -1,3 +1,15 @@
+2019-03-01  Don Olmstead  <don.olmstead@sony.com>
+
+        [WinCairo] Enable service worker
+        https://bugs.webkit.org/show_bug.cgi?id=188318
+
+        Reviewed by Youenn Fablet.
+
+        * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+        (WebKit::WebSWContextManagerConnection::terminateProcess):
+        * WebProcess/Storage/WebSWContextManagerConnection.h:
+        * config.h:
+
 2019-03-01  Chris Dumez  <cdumez@apple.com>
 
         Flaky API Test TestWebKitAPI.ProcessSwap.LoadUnload
index 5bd823f..4db7a8c 100644 (file)
@@ -357,7 +357,7 @@ void WebSWContextManagerConnection::didFinishSkipWaiting(uint64_t callbackID)
         callback();
 }
 
-NO_RETURN void WebSWContextManagerConnection::terminateProcess()
+void WebSWContextManagerConnection::terminateProcess()
 {
     RELEASE_LOG(ServiceWorker, "Service worker process is exiting because it is no longer needed");
     _exit(EXIT_SUCCESS);
index 9460f0e..f71af45 100644 (file)
@@ -90,7 +90,7 @@ private:
     void claimCompleted(uint64_t claimRequestIdentifier);
     void didFinishSkipWaiting(uint64_t callbackID);
     void setUserAgent(String&& userAgent);
-    void terminateProcess();
+    NO_RETURN void terminateProcess();
 
     Ref<IPC::Connection> m_connectionToNetworkProcess;
     uint64_t m_pageGroupID;
index 65dcb3b..2c24c7f 100644 (file)
@@ -36,6 +36,8 @@
 #if PLATFORM(WIN)
 #undef WEBCORE_EXPORT
 #define WEBCORE_EXPORT WTF_EXPORT_DECLARATION
+#undef WEBCORE_TESTSUPPORT_EXPORT
+#define WEBCORE_TESTSUPPORT_EXPORT WTF_EXPORT_DECLARATION
 #endif // PLATFORM(WIN)
 
 #ifdef __cplusplus
index 0133e8a..017b26d 100644 (file)
@@ -85,6 +85,7 @@ if (${WTF_PLATFORM_WIN_CAIRO})
 
     # Experimental features
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_LOAD_STATISTICS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 
     # FIXME: Implement plugin process on Modern WebKit. https://bugs.webkit.org/show_bug.cgi?id=185313
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)
index c7c7194..93448b5 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-01  Don Olmstead  <don.olmstead@sony.com>
+
+        [WinCairo] Enable service worker
+        https://bugs.webkit.org/show_bug.cgi?id=188318
+
+        Reviewed by Youenn Fablet.
+
+        * DumpRenderTree/DumpRenderTreePrefix.h:
+        * TestWebKitAPI/PlatformWin.cmake:
+        * TestWebKitAPI/win/TestWebKitAPIPrefix.h:
+        * WebKitTestRunner/InjectedBundle/win/TestRunnerInjectedBundlePrefix.h:
+        * WebKitTestRunner/WebKitTestRunnerPrefix.h:
+
 2019-03-01  Justin Fan  <justin_fan@apple.com>
 
         [Web GPU] 32-bit builds broken by attempt to disable WebGPU on 32-bit
index 105b543..a34ab82 100644 (file)
@@ -36,7 +36,9 @@
 #import <Foundation/Foundation.h>
 #endif
 
-#if OS(WINDOWS)
+#if PLATFORM(WIN)
 #undef WEBCORE_EXPORT
 #define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
+#undef WEBCORE_TESTSUPPORT_EXPORT
+#define WEBCORE_TESTSUPPORT_EXPORT
 #endif
index 4fbcbc4..24194a9 100644 (file)
@@ -18,7 +18,7 @@ include_directories(
     ${DERIVED_SOURCES_DIR}/WebKit/Interfaces
 )
 
-add_definitions(-DWEBCORE_EXPORT=)
+add_definitions(-DWEBCORE_EXPORT= -DWEBCORE_TESTSUPPORT_EXPORT=)
 
 set(test_webcore_LIBRARIES
     Crypt32
index 8b655f0..9f6c4ff 100644 (file)
@@ -28,3 +28,5 @@
 
 #undef WEBCORE_EXPORT
 #define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
+#undef WEBCORE_TESTSUPPORT_EXPORT
+#define WEBCORE_TESTSUPPORT_EXPORT WTF_IMPORT_DECLARATION
index 78fe41c..3142550 100644 (file)
@@ -25,3 +25,5 @@
 
 #undef WEBCORE_EXPORT
 #define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
+#undef WEBCORE_TESTSUPPORT_EXPORT
+#define WEBCORE_TESTSUPPORT_EXPORT WTF_IMPORT_DECLARATION
index 78ee765..580253b 100644 (file)
@@ -48,7 +48,9 @@
 #undef catch
 #endif
 
-#if OS(WINDOWS)
+#if PLATFORM(WIN)
 #undef WEBCORE_EXPORT
 #define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
+#undef WEBCORE_TESTSUPPORT_EXPORT
+#define WEBCORE_TESTSUPPORT_EXPORT WTF_IMPORT_DECLARATION
 #endif