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

Issue 10661026: WebSocket Pepper API: allow to release in completion callbacks (Closed)

Created:
8 years, 6 months ago by Takashi Toyoshima
Modified:
8 years, 5 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Allow to release WebSocket resource in completion callbacks invoked by Close(). - Protect |this| around invoking plugin callbacks - Add unit tests to check the case BUG= TEST=browser_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144872

Patch Set 1 #

Patch Set 2 : Use WeakPtr to protect |this| #

Total comments: 12

Patch Set 3 : reflects review comments #

Total comments: 3

Patch Set 4 : remove redundant test case #

Patch Set 5 : use ref count #

Patch Set 6 : add another unit test #

Total comments: 3

Patch Set 7 : delegate must have a virtual destructor #

Patch Set 8 : remvoe redundant checker #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -3 lines) Patch
M ppapi/tests/test_utils.h View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M ppapi/tests/test_utils.cc View 5 chunks +9 lines, -3 lines 0 comments Download
M ppapi/tests/test_websocket.cc View 1 2 3 4 5 6 7 2 chunks +54 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_websocket_impl.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Takashi Toyoshima
Hi David, This is a review request which is mentioned in my email. Thanks.
8 years, 6 months ago (2012-06-25 13:39:58 UTC) #1
dmichael (off chromium)
https://chromiumcodereview.appspot.com/10661026/diff/2007/ppapi/tests/test_utils.h File ppapi/tests/test_utils.h (right): https://chromiumcodereview.appspot.com/10661026/diff/2007/ppapi/tests/test_utils.h#newcode75 ppapi/tests/test_utils.h:75: void SetDelegate(Delegate* delegate) { delegate_ = delegate; } Please ...
8 years, 6 months ago (2012-06-25 15:50:50 UTC) #2
Takashi Toyoshima
Thank you for looking this. I have one question about a behavior as I replied ...
8 years, 6 months ago (2012-06-26 09:19:10 UTC) #3
dmichael (off chromium)
http://codereview.chromium.org/10661026/diff/2007/webkit/plugins/ppapi/ppb_websocket_impl.cc File webkit/plugins/ppapi/ppb_websocket_impl.cc (right): http://codereview.chromium.org/10661026/diff/2007/webkit/plugins/ppapi/ppb_websocket_impl.cc#newcode505 webkit/plugins/ppapi/ppb_websocket_impl.cc:505: const base::WeakPtr<PPB_WebSocket_Impl> weak_ptr = AsWeakPtr(); On 2012/06/26 09:19:10, toyoshim ...
8 years, 6 months ago (2012-06-26 16:01:40 UTC) #4
Takashi Toyoshima
Thanks. Your advice is helpful to understand deeply. http://codereview.chromium.org/10661026/diff/2007/webkit/plugins/ppapi/ppb_websocket_impl.cc File webkit/plugins/ppapi/ppb_websocket_impl.cc (right): http://codereview.chromium.org/10661026/diff/2007/webkit/plugins/ppapi/ppb_websocket_impl.cc#newcode505 webkit/plugins/ppapi/ppb_websocket_impl.cc:505: const ...
8 years, 5 months ago (2012-06-27 08:09:05 UTC) #5
dmichael (off chromium)
http://codereview.chromium.org/10661026/diff/15001/ppapi/tests/test_websocket.cc File ppapi/tests/test_websocket.cc (right): http://codereview.chromium.org/10661026/diff/15001/ppapi/tests/test_websocket.cc#newcode123 ppapi/tests/test_websocket.cc:123: CallbackDelegate* GetDelegateFor(WebSocketEvent::EventType type, I don't think you need CallbackChecker ...
8 years, 5 months ago (2012-06-27 19:52:17 UTC) #6
Takashi Toyoshima
Thanks. I removed CallbackChecker. Also update the CL description. http://codereview.chromium.org/10661026/diff/15001/ppapi/tests/test_websocket.cc File ppapi/tests/test_websocket.cc (right): http://codereview.chromium.org/10661026/diff/15001/ppapi/tests/test_websocket.cc#newcode1024 ppapi/tests/test_websocket.cc:1024: ...
8 years, 5 months ago (2012-06-28 08:05:37 UTC) #7
dmichael (off chromium)
lgtm
8 years, 5 months ago (2012-06-28 16:08:22 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/toyoshim@chromium.org/10661026/22001
8 years, 5 months ago (2012-06-29 03:37:16 UTC) #9
commit-bot: I haz the power
8 years, 5 months ago (2012-06-29 04:41:43 UTC) #10
Change committed as 144872

Powered by Google App Engine
This is Rietveld 408576698