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

Issue 2271133002: WebSocket: Stop Bridge::disconnect() from waiting until Peer::disconnect() is complete (Closed)

Created:
4 years, 4 months ago by nhiroki
Modified:
4 years, 4 months ago
Reviewers:
haraken, yhirano
CC:
chromium-reviews, blink-reviews, tyoshino+watch_chromium.org, yhirano+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WebSocket: Stop Bridge::disconnect() from waiting until Peer::disconnect() is complete Bridge::disconnect() on a worker thread waited until Peer::disconnect() is complete on the main thread to make sure that Peer never dereferences a pointer to Bridge after disconnection. However, in the current implementation, the pointer is CrossThreadWeakPersistent and its existence is appropriately checked before access[1], so Bridge::disconnect() no longer have to wait until it's nullified on Peer::disconnect(). [1] https://codereview.chromium.org/2123703002 BUG=639153, 640088 Committed: https://crrev.com/70a476ad4428cd7ca9bfa0fc69fda3deff7268fb Cr-Commit-Position: refs/heads/master@{#414040}

Patch Set 1 #

Total comments: 2

Patch Set 2 : address review comments #

Patch Set 3 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -78 lines) Patch
M third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h View 4 chunks +2 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp View 1 2 12 chunks +35 lines, -71 lines 0 comments Download

Messages

Total messages: 19 (12 generated)
nhiroki
Hi, can you review this? After this CL, other my CLs[1,2] are no longer necessary. ...
4 years, 4 months ago (2016-08-24 07:53:13 UTC) #9
yhirano
lgtm, thank you. https://codereview.chromium.org/2271133002/diff/20001/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp File third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp (right): https://codereview.chromium.org/2271133002/diff/20001/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp#newcode443 third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp:443: m_loaderProxy->postTaskToLoader(BLINK_FROM_HERE, createCrossThreadTask(&Peer::disconnect, wrapCrossThreadPersistent(m_peer.get()))); |m_peer| is a ...
4 years, 4 months ago (2016-08-24 08:01:42 UTC) #10
haraken
This looks much simpler. LGTM.
4 years, 4 months ago (2016-08-24 08:09:19 UTC) #11
nhiroki
Thank you! https://codereview.chromium.org/2271133002/diff/20001/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp File third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp (right): https://codereview.chromium.org/2271133002/diff/20001/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp#newcode443 third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp:443: m_loaderProxy->postTaskToLoader(BLINK_FROM_HERE, createCrossThreadTask(&Peer::disconnect, wrapCrossThreadPersistent(m_peer.get()))); On 2016/08/24 08:01:42, yhirano ...
4 years, 4 months ago (2016-08-24 08:37:18 UTC) #12
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/2271133002/60001
4 years, 4 months ago (2016-08-24 08:37:47 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 4 months ago (2016-08-24 10:30:08 UTC) #17
commit-bot: I haz the power
4 years, 4 months ago (2016-08-24 10:33:50 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/70a476ad4428cd7ca9bfa0fc69fda3deff7268fb
Cr-Commit-Position: refs/heads/master@{#414040}

Powered by Google App Engine
This is Rietveld 408576698