Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Issue 2564493002: Make WebSocket available again in service workers (Closed)

Created:
4 years ago by tyoshino (SeeGerritForStatus)
Modified:
4 years ago
Reviewers:
falken, yhirano
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, shimazu+serviceworker_chromium.org, yhirano+watch_chromium.org, serviceworker-reviews, tyoshino+watch_chromium.org, nhiroki, haraken, kinuko+serviceworker, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, tzik
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make WebSocket available again in service workers The patch https://codereview.chromium.org/2284473002/ was basically a refactoring change, but it also included a change that it started using the InterfaceProvider instance of the LocalFrame of the associated Document if any. However, in a service worker, the LocalFrame returns the empty provider obtained by calling InterfaceProvider::getEmptyInterfaceProvider(). This is because the WebEmbeddedWorkerImpl used for service workers doesn't override the WebFrameClient::interfaceProvider() method which returns nullptr by default while one on the WebSharedWorkerImpl and RenderFrameImpl returns an effective InterfaceProvider instance. This patch fixes the issue by changing the code to use the InterfaceProvider of the LocalFrame only when it's not the empty provider. R=falken@chromium.org TBR=yhirano@chromium.org BUG=671588 Committed: https://crrev.com/dd3b58a1f0073215d58bcb8dc216b89e546bc9f7 Cr-Commit-Position: refs/heads/master@{#437406}

Patch Set 1 #

Patch Set 2 : a #

Total comments: 10

Patch Set 3 : Use platform interface provide when the frame() doesn't have it #

Patch Set 4 : Addressed #5 #

Patch Set 5 : Removed unnecessary line #

Total comments: 6

Patch Set 6 : Don't use the interface provider returned by the frame if it's empty provider #

Patch Set 7 : Addressed #15 #

Total comments: 2

Patch Set 8 : Addressed #26 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js View 1 2 3 4 5 6 7 1 chunk +35 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/websocket-in-service-worker.html View 1 2 3 4 5 6 1 chunk +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 40 (25 generated)
falken
Thanks for the fix. Could you add to the CL description why "(document()->frame()->interfaceProvider())" was incorrect? ...
4 years ago (2016-12-08 07:29:26 UTC) #5
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2564493002/diff/20001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js File third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js (right): https://codereview.chromium.org/2564493002/diff/20001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js#newcode34 third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js:34: }; On 2016/12/08 07:29:26, falken wrote: > this file ...
4 years ago (2016-12-08 08:55:01 UTC) #10
tyoshino (SeeGerritForStatus)
We need to change LocalFrame to make it distinguishable whether the retrieved interface provider is ...
4 years ago (2016-12-08 08:57:28 UTC) #11
falken
https://codereview.chromium.org/2564493002/diff/80001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js File third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js (right): https://codereview.chromium.org/2564493002/diff/80001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js#newcode34 third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js:34: }; sorry I gave a bad review about simple.js ...
4 years ago (2016-12-08 13:12:30 UTC) #15
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2564493002/diff/80001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js File third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js (right): https://codereview.chromium.org/2564493002/diff/80001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js#newcode34 third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js:34: }; On 2016/12/08 13:12:29, falken wrote: > sorry I ...
4 years ago (2016-12-08 13:50:04 UTC) #16
tyoshino (SeeGerritForStatus)
Sorry, I've uploaded the patch with the fixes now. PTAL at ps7. In ps6, I've ...
4 years ago (2016-12-08 14:03:21 UTC) #17
tyoshino (SeeGerritForStatus)
I've updated the CL description to explain all the background and what change this patch ...
4 years ago (2016-12-08 14:15:52 UTC) #22
tyoshino (SeeGerritForStatus)
OK. All bots are green now for ps6.
4 years ago (2016-12-08 14:59:32 UTC) #23
falken
lgtm https://codereview.chromium.org/2564493002/diff/120001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js File third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js (right): https://codereview.chromium.org/2564493002/diff/120001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js#newcode26 third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js:26: reportFailure('Closed before receiving reply'); nit: won't make a ...
4 years ago (2016-12-08 15:48:24 UTC) #26
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/2564493002/diff/120001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js File third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js (right): https://codereview.chromium.org/2564493002/diff/120001/third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js#newcode26 third_party/WebKit/LayoutTests/http/tests/serviceworker/websocket/resources/simple.js:26: reportFailure('Closed before receiving reply'); On 2016/12/08 15:48:24, falken wrote: ...
4 years ago (2016-12-08 16:07:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2564493002/140001
4 years ago (2016-12-08 16:13:47 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/82346)
4 years ago (2016-12-08 17:47:02 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2564493002/140001
4 years ago (2016-12-09 00:38:39 UTC) #35
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years ago (2016-12-09 01:21:58 UTC) #38
commit-bot: I haz the power
4 years ago (2016-12-09 01:26:11 UTC) #40
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/dd3b58a1f0073215d58bcb8dc216b89e546bc9f7
Cr-Commit-Position: refs/heads/master@{#437406}

Powered by Google App Engine
This is Rietveld 408576698