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

Issue 11859015: Pepper: Introduce ThreadAwareCallback. (Closed)

Created:
7 years, 11 months ago by yzshen1
Modified:
7 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Pepper: Introduce ThreadAwareCallback. Some PPB interfaces have methods that set a custom callback. Usually, the callback has to be called on the same thread as the one it was set on. ThreadAwareCallback keeps track of the target thread, and posts a task to run on it if requested from a different thread. BUG=None TEST=newly added unittests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=177319

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : sync and update tests accordingly. #

Total comments: 36

Patch Set 4 : Changes in response to David's suggestions #

Total comments: 2

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+650 lines, -68 lines) Patch
M chrome/browser/component_updater/test/component_installers_unittest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/ppapi_shared.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/ppapi_tests.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/proxy/device_enumeration_resource_helper.h View 2 chunks +3 lines, -1 line 0 comments Download
M ppapi/proxy/device_enumeration_resource_helper.cc View 1 2 3 4 5 chunks +11 lines, -9 lines 0 comments Download
M ppapi/proxy/plugin_globals.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/plugin_globals.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/proxy/ppapi_proxy_test.h View 1 2 3 4 5 6 chunks +73 lines, -3 lines 0 comments Download
M ppapi/proxy/ppapi_proxy_test.cc View 1 2 3 4 5 13 chunks +136 lines, -18 lines 0 comments Download
M ppapi/proxy/ppb_message_loop_proxy.h View 2 chunks +2 lines, -1 line 0 comments Download
M ppapi/proxy/ppb_var_unittest.cc View 1 2 3 4 5 6 7 8 chunks +7 lines, -21 lines 0 comments Download
M ppapi/shared_impl/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/shared_impl/ppapi_globals.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M ppapi/shared_impl/ppapi_globals.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ppapi/shared_impl/test_globals.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ppapi/shared_impl/test_globals.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A ppapi/shared_impl/thread_aware_callback.h View 1 2 3 4 1 chunk +115 lines, -0 lines 0 comments Download
A ppapi/shared_impl/thread_aware_callback.cc View 1 2 3 4 1 chunk +63 lines, -0 lines 0 comments Download
A ppapi/shared_impl/thread_aware_callback_unittest.cc View 1 2 3 4 5 6 1 chunk +218 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/host_globals.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/host_globals.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
yzshen1
Hi, David. Would you please take a look? Thanks!
7 years, 11 months ago (2013-01-11 20:14:27 UTC) #1
yzshen
Friendly ping. :) On Fri, Jan 11, 2013 at 12:14 PM, <yzshen@chromium.org> wrote: > Reviewers: ...
7 years, 11 months ago (2013-01-15 17:41:10 UTC) #2
dmichael (off chromium)
https://codereview.chromium.org/11859015/diff/4002/ppapi/proxy/ppapi_proxy_test.cc File ppapi/proxy/ppapi_proxy_test.cc (right): https://codereview.chromium.org/11859015/diff/4002/ppapi/proxy/ppapi_proxy_test.cc#newcode323 ppapi/proxy/ppapi_proxy_test.cc:323: // PP_OK_COMPLETIONPENDING. Either fix the comment or the implementation. ...
7 years, 11 months ago (2013-01-15 22:43:52 UTC) #3
yzshen1
Thanks David! Please take another look! https://codereview.chromium.org/11859015/diff/4002/ppapi/proxy/ppapi_proxy_test.cc File ppapi/proxy/ppapi_proxy_test.cc (right): https://codereview.chromium.org/11859015/diff/4002/ppapi/proxy/ppapi_proxy_test.cc#newcode323 ppapi/proxy/ppapi_proxy_test.cc:323: // PP_OK_COMPLETIONPENDING. Either ...
7 years, 11 months ago (2013-01-16 18:55:59 UTC) #4
dmichael (off chromium)
https://codereview.chromium.org/11859015/diff/4002/ppapi/shared_impl/thread_aware_callback.cc File ppapi/shared_impl/thread_aware_callback.cc (right): https://codereview.chromium.org/11859015/diff/4002/ppapi/shared_impl/thread_aware_callback.cc#newcode22 ppapi/shared_impl/thread_aware_callback.cc:22: ProxyAutoLock auto_lock; On 2013/01/16 18:55:59, yzshen1 wrote: > RunWhileLocked() ...
7 years, 11 months ago (2013-01-16 19:21:00 UTC) #5
yzshen1
Thanks David! Please take another look. https://codereview.chromium.org/11859015/diff/4002/ppapi/shared_impl/thread_aware_callback.cc File ppapi/shared_impl/thread_aware_callback.cc (right): https://codereview.chromium.org/11859015/diff/4002/ppapi/shared_impl/thread_aware_callback.cc#newcode22 ppapi/shared_impl/thread_aware_callback.cc:22: ProxyAutoLock auto_lock; Done. ...
7 years, 11 months ago (2013-01-16 22:37:36 UTC) #6
dmichael (off chromium)
Thanks, looks great! There seems to be a unit test failure, but otherwise lgtm
7 years, 11 months ago (2013-01-16 22:53:48 UTC) #7
dmichael (off chromium)
Ah, I was looking at an old patch set when I noted the failing unit ...
7 years, 11 months ago (2013-01-16 22:54:40 UTC) #8
yzshen1
Hi, Brett. I need an OWNER stamp for: chrome/browser/component_updater/test/component_installers_unittest.cc Thanks! :)
7 years, 11 months ago (2013-01-16 23:01:59 UTC) #9
brettw
random unit test lgtm
7 years, 11 months ago (2013-01-16 23:03:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yzshen@chromium.org/11859015/37001
7 years, 11 months ago (2013-01-17 00:40:39 UTC) #11
commit-bot: I haz the power
7 years, 11 months ago (2013-01-17 02:38:26 UTC) #12
Message was sent while issue was closed.
Change committed as 177319

Powered by Google App Engine
This is Rietveld 408576698