Title: [248062] branches/safari-608-branch
Revision
248062
Author
[email protected]
Date
2019-07-31 13:56:28 -0700 (Wed, 31 Jul 2019)

Log Message

Cherry-pick r247923. rdar://problem/53764209

    REGRESSION: WebSockets no longer work in Service Workers
    https://bugs.webkit.org/show_bug.cgi?id=199906
    <rdar://problem/53516732>

    Reviewed by Geoffrey Garen.

    Source/WebKit:

    Use WebSocketProvider so that network calls are done in the network process.

    * WebProcess/Storage/WebSWContextManagerConnection.cpp:
    (WebKit::WebSWContextManagerConnection::installServiceWorker):

    LayoutTests:

    Fix test and make sure messages are exchanged for the test to succeed.

    * http/tests/workers/service/resources/serviceworker-websocket-worker.js:
    (async.doTest):

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

Modified Paths

Diff

Modified: branches/safari-608-branch/LayoutTests/ChangeLog (248061 => 248062)


--- branches/safari-608-branch/LayoutTests/ChangeLog	2019-07-31 20:56:25 UTC (rev 248061)
+++ branches/safari-608-branch/LayoutTests/ChangeLog	2019-07-31 20:56:28 UTC (rev 248062)
@@ -1,5 +1,45 @@
 2019-07-31  Alan Coon  <[email protected]>
 
+        Cherry-pick r247923. rdar://problem/53764209
+
+    REGRESSION: WebSockets no longer work in Service Workers
+    https://bugs.webkit.org/show_bug.cgi?id=199906
+    <rdar://problem/53516732>
+    
+    Reviewed by Geoffrey Garen.
+    
+    Source/WebKit:
+    
+    Use WebSocketProvider so that network calls are done in the network process.
+    
+    * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+    (WebKit::WebSWContextManagerConnection::installServiceWorker):
+    
+    LayoutTests:
+    
+    Fix test and make sure messages are exchanged for the test to succeed.
+    
+    * http/tests/workers/service/resources/serviceworker-websocket-worker.js:
+    (async.doTest):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-29  Youenn Fablet  <[email protected]>
+
+            REGRESSION: WebSockets no longer work in Service Workers
+            https://bugs.webkit.org/show_bug.cgi?id=199906
+            <rdar://problem/53516732>
+
+            Reviewed by Geoffrey Garen.
+
+            Fix test and make sure messages are exchanged for the test to succeed.
+
+            * http/tests/workers/service/resources/serviceworker-websocket-worker.js:
+            (async.doTest):
+
+2019-07-31  Alan Coon  <[email protected]>
+
         Cherry-pick r247916. rdar://problem/53764235
 
     REGRESSION (r247891): Layout Test accessibility/ios-simulator/video-elements-ios.html is failing

Modified: branches/safari-608-branch/LayoutTests/http/tests/workers/service/resources/serviceworker-websocket-worker.js (248061 => 248062)


--- branches/safari-608-branch/LayoutTests/http/tests/workers/service/resources/serviceworker-websocket-worker.js	2019-07-31 20:56:25 UTC (rev 248061)
+++ branches/safari-608-branch/LayoutTests/http/tests/workers/service/resources/serviceworker-websocket-worker.js	2019-07-31 20:56:28 UTC (rev 248062)
@@ -4,7 +4,6 @@
         event.source.postMessage("FAIL: received unexpected message from client");
         return;
     }
-            event.source.postMessage("PASS");
 
     try {
         var webSocket = new WebSocket('ws://localhost:8880/websocket/tests/hybi/workers/resources/echo');
@@ -13,9 +12,13 @@
             event.source.postMessage("FAIL: websocket had an error: " + e);
         };
 
-        webSocket._onopen_ = () => {
+        webSocket._onmessage_ = (e) => {
             event.source.postMessage("PASS");
         };
+
+        webSocket._onopen_ = () => {
+            webSocket.send("PASS?");
+        };
     } catch (e) {
         event.source.postMessage("FAIL: exception was raised: " + e);
     }

Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (248061 => 248062)


--- branches/safari-608-branch/Source/WebKit/ChangeLog	2019-07-31 20:56:25 UTC (rev 248061)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog	2019-07-31 20:56:28 UTC (rev 248062)
@@ -1,5 +1,45 @@
 2019-07-31  Alan Coon  <[email protected]>
 
+        Cherry-pick r247923. rdar://problem/53764209
+
+    REGRESSION: WebSockets no longer work in Service Workers
+    https://bugs.webkit.org/show_bug.cgi?id=199906
+    <rdar://problem/53516732>
+    
+    Reviewed by Geoffrey Garen.
+    
+    Source/WebKit:
+    
+    Use WebSocketProvider so that network calls are done in the network process.
+    
+    * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+    (WebKit::WebSWContextManagerConnection::installServiceWorker):
+    
+    LayoutTests:
+    
+    Fix test and make sure messages are exchanged for the test to succeed.
+    
+    * http/tests/workers/service/resources/serviceworker-websocket-worker.js:
+    (async.doTest):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-29  Youenn Fablet  <[email protected]>
+
+            REGRESSION: WebSockets no longer work in Service Workers
+            https://bugs.webkit.org/show_bug.cgi?id=199906
+            <rdar://problem/53516732>
+
+            Reviewed by Geoffrey Garen.
+
+            Use WebSocketProvider so that network calls are done in the network process.
+
+            * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+            (WebKit::WebSWContextManagerConnection::installServiceWorker):
+
+2019-07-31  Alan Coon  <[email protected]>
+
         Cherry-pick r247920. rdar://problem/53764045
 
     Contextual menu does not present when holding an embedded photo but works with link and attachments

Modified: branches/safari-608-branch/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (248061 => 248062)


--- branches/safari-608-branch/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2019-07-31 20:56:25 UTC (rev 248061)
+++ branches/safari-608-branch/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2019-07-31 20:56:28 UTC (rev 248062)
@@ -145,6 +145,7 @@
 #if ENABLE(INDEXED_DATABASE)
     pageConfiguration.databaseProvider = WebDatabaseProvider::getOrCreate(m_pageGroupID);
 #endif
+    pageConfiguration.socketProvider = WebSocketProvider::create();
 
     auto effectiveUserAgent =  WTFMove(userAgent);
     if (effectiveUserAgent.isNull())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to