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

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed)

Created:
8 years, 8 months ago by dmichael (off chromium)
Modified:
8 years, 6 months ago
Reviewers:
brettw
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

PPAPI: Make blocking completion callbacks work. This also makes scoped_refptr<TrackedCallback> the "new" way to pass completion callbacks in an API. This allows the Enter object to handle checking for blocking callbacks on the main thread to report error, and blocking if on the background thread. This way, interfaces don't have to write any special cases for blocking callbacks. When built with enable_pepper_threading=1 locally, URLLoader tests all pass for blocking completion callbacks. I haven't updated all tests yet. BUG=92909 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=143806

Patch Set 1 : Updated TestURLLoader to test blocking callbacks. #

Total comments: 5

Patch Set 2 : Cleaned up for review. #

Total comments: 8

Patch Set 3 : merged #

Patch Set 4 : #

Patch Set 5 : tiny style cleanup and additional comments #

Patch Set 6 : try again #

Total comments: 12

Patch Set 7 : merge + review comments #

Patch Set 8 : Make test_case.h not include pp_thread.h to fix win #

Patch Set 9 : typo #

Patch Set 10 : merge file_chooser change #

Patch Set 11 : export AssertLockHeld #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1432 lines, -981 lines) Patch
M ppapi/proxy/enter_proxy.h View 1 2 3 4 7 chunks +34 lines, -23 lines 0 comments Download
M ppapi/proxy/plugin_dispatcher.h View 1 2 3 4 5 6 3 chunks +4 lines, -2 lines 0 comments Download
M ppapi/proxy/plugin_dispatcher.cc View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M ppapi/proxy/ppb_audio_input_proxy.cc View 1 2 3 6 chunks +18 lines, -15 lines 0 comments Download
M ppapi/proxy/ppb_audio_proxy.cc View 1 2 3 4 5 6 2 chunks +4 lines, -3 lines 0 comments Download
M ppapi/proxy/ppb_broker_proxy.cc View 1 2 3 2 chunks +4 lines, -8 lines 0 comments Download
M ppapi/proxy/ppb_core_proxy.cc View 3 chunks +6 lines, -10 lines 0 comments Download
M ppapi/proxy/ppb_file_chooser_proxy.cc View 1 2 3 4 5 6 7 8 9 4 chunks +11 lines, -14 lines 0 comments Download
M ppapi/proxy/ppb_file_io_proxy.cc View 1 2 3 10 chunks +41 lines, -33 lines 0 comments Download
M ppapi/proxy/ppb_file_ref_proxy.cc View 1 2 3 7 chunks +27 lines, -44 lines 0 comments Download
M ppapi/proxy/ppb_file_system_proxy.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M ppapi/proxy/ppb_flash_menu_proxy.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M ppapi/proxy/ppb_graphics_2d_proxy.cc View 1 2 3 2 chunks +3 lines, -8 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/ppb_instance_proxy.cc View 1 2 3 4 5 6 4 chunks +8 lines, -10 lines 0 comments Download
M ppapi/proxy/ppb_message_loop_proxy.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M ppapi/proxy/ppb_network_monitor_private_proxy.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_network_monitor_private_proxy.cc View 5 chunks +14 lines, -5 lines 0 comments Download
M ppapi/proxy/ppb_talk_private_proxy.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_tcp_server_socket_private_proxy.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M ppapi/proxy/ppb_url_loader_proxy.cc View 1 2 3 6 chunks +17 lines, -25 lines 0 comments Download
M ppapi/proxy/ppb_video_capture_proxy.cc View 1 2 3 3 chunks +7 lines, -10 lines 0 comments Download
M ppapi/proxy/ppb_video_decoder_proxy.cc View 1 2 3 5 chunks +7 lines, -7 lines 0 comments Download
M ppapi/proxy/proxy_array_output.h View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/shared_impl/ppapi_globals.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M ppapi/shared_impl/ppapi_globals.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M ppapi/shared_impl/ppb_audio_config_shared.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/shared_impl/ppb_audio_input_shared.h View 1 2 3 4 chunks +9 lines, -7 lines 0 comments Download
M ppapi/shared_impl/ppb_audio_input_shared.cc View 1 2 3 5 chunks +8 lines, -10 lines 0 comments Download
M ppapi/shared_impl/ppb_file_io_shared.h View 1 2 3 5 chunks +19 lines, -20 lines 0 comments Download
M ppapi/shared_impl/ppb_file_io_shared.cc View 1 2 3 7 chunks +22 lines, -27 lines 0 comments Download
M ppapi/shared_impl/ppb_graphics_3d_shared.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ppapi/shared_impl/ppb_graphics_3d_shared.cc View 1 2 3 4 5 6 1 chunk +3 lines, -8 lines 0 comments Download
M ppapi/shared_impl/ppb_video_capture_shared.h View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M ppapi/shared_impl/ppb_video_capture_shared.cc View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M ppapi/shared_impl/ppb_video_decoder_shared.h View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download
M ppapi/shared_impl/ppb_video_decoder_shared.cc View 1 2 3 1 chunk +8 lines, -9 lines 0 comments Download
M ppapi/shared_impl/private/ppb_host_resolver_shared.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ppapi/shared_impl/private/ppb_host_resolver_shared.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/shared_impl/private/ppb_tcp_server_socket_shared.cc View 1 2 3 2 chunks +9 lines, -11 lines 0 comments Download
M ppapi/shared_impl/private/tcp_socket_private_impl.h View 1 2 3 1 chunk +8 lines, -7 lines 0 comments Download
M ppapi/shared_impl/private/tcp_socket_private_impl.cc View 1 2 3 7 chunks +13 lines, -24 lines 0 comments Download
M ppapi/shared_impl/private/udp_socket_private_impl.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M ppapi/shared_impl/private/udp_socket_private_impl.cc View 1 2 3 5 chunks +12 lines, -13 lines 0 comments Download
M ppapi/shared_impl/proxy_lock.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/shared_impl/proxy_lock.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ppapi/shared_impl/tracked_callback.h View 1 8 chunks +54 lines, -12 lines 0 comments Download
M ppapi/shared_impl/tracked_callback.cc View 1 6 chunks +112 lines, -20 lines 0 comments Download
M ppapi/tests/test_broker.cc View 1 2 3 4 5 6 3 chunks +12 lines, -21 lines 0 comments Download
M ppapi/tests/test_case.h View 1 2 3 4 5 6 7 6 chunks +105 lines, -21 lines 0 comments Download
M ppapi/tests/test_case.cc View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -2 lines 0 comments Download
M ppapi/tests/test_url_loader.cc View 4 chunks +35 lines, -28 lines 0 comments Download
M ppapi/tests/test_utils.cc View 1 4 chunks +8 lines, -3 lines 0 comments Download
M ppapi/thunk/enter.h View 1 2 3 4 5 6 7 8 9 10 11 chunks +67 lines, -32 lines 0 comments Download
M ppapi/thunk/enter.cc View 1 2 3 4 5 6 3 chunks +121 lines, -45 lines 0 comments Download
M ppapi/thunk/ppb_audio_api.h View 1 2 3 2 chunks +8 lines, -3 lines 0 comments Download
M ppapi/thunk/ppb_audio_input_api.h View 1 2 3 4 chunks +6 lines, -5 lines 0 comments Download
M ppapi/thunk/ppb_audio_input_thunk.cc View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_audio_input_trusted_thunk.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_audio_trusted_thunk.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_broker_api.h View 1 2 3 1 chunk +6 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_broker_thunk.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_directory_reader_api.h View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_directory_reader_thunk.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_file_chooser_api.h View 1 2 3 2 chunks +9 lines, -5 lines 0 comments Download
M ppapi/thunk/ppb_file_chooser_thunk.cc View 1 2 3 4 5 6 5 chunks +5 lines, -4 lines 0 comments Download
M ppapi/thunk/ppb_file_io_api.h View 1 2 3 2 chunks +14 lines, -10 lines 0 comments Download
M ppapi/thunk/ppb_file_io_thunk.cc View 1 2 3 8 chunks +9 lines, -7 lines 0 comments Download
M ppapi/thunk/ppb_file_io_trusted_thunk.cc View 1 2 3 4 chunks +5 lines, -3 lines 0 comments Download
M ppapi/thunk/ppb_file_ref_api.h View 1 2 3 2 chunks +7 lines, -5 lines 0 comments Download
M ppapi/thunk/ppb_file_ref_thunk.cc View 1 2 3 5 chunks +6 lines, -4 lines 0 comments Download
M ppapi/thunk/ppb_file_system_api.h View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_file_system_thunk.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_flash_menu_api.h View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_flash_menu_thunk.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_graphics_2d_api.h View 1 2 3 3 chunks +6 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_graphics_2d_thunk.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M ppapi/thunk/ppb_graphics_3d_api.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_graphics_3d_thunk.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_host_resolver_private_api.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_host_resolver_private_thunk.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_instance_api.h View 1 2 3 4 5 6 3 chunks +4 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_layer_compositor_api.h View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_message_loop_api.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_mouse_lock_thunk.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_talk_private_api.h View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_talk_private_thunk.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_tcp_server_socket_private_api.h View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_tcp_server_socket_private_thunk.cc View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_tcp_socket_private_api.h View 1 2 3 2 chunks +11 lines, -6 lines 0 comments Download
M ppapi/thunk/ppb_tcp_socket_private_thunk.cc View 1 2 3 6 chunks +8 lines, -5 lines 0 comments Download
M ppapi/thunk/ppb_udp_socket_private_api.h View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M ppapi/thunk/ppb_udp_socket_private_thunk.cc View 1 2 3 4 chunks +5 lines, -3 lines 0 comments Download
M ppapi/thunk/ppb_url_loader_api.h View 1 2 3 3 chunks +10 lines, -5 lines 0 comments Download
M ppapi/thunk/ppb_url_loader_thunk.cc View 1 2 3 5 chunks +6 lines, -4 lines 0 comments Download
M ppapi/thunk/ppb_video_capture_api.h View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_video_capture_thunk.cc View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_video_decoder_api.h View 1 2 3 2 chunks +8 lines, -4 lines 0 comments Download
M ppapi/thunk/ppb_video_decoder_thunk.cc View 1 2 3 4 chunks +5 lines, -3 lines 0 comments Download
M ppapi/thunk/ppb_websocket_api.h View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M ppapi/thunk/ppb_websocket_thunk.cc View 1 2 3 4 chunks +5 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/plugin_module.cc View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -9 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.h View 1 2 3 4 5 6 3 chunks +5 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 6 5 chunks +8 lines, -12 lines 0 comments Download
M webkit/plugins/ppapi/ppb_audio_impl.h View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_audio_impl.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_audio_input_impl.h View 1 2 3 2 chunks +7 lines, -6 lines 0 comments Download
M webkit/plugins/ppapi/ppb_audio_input_impl.cc View 1 2 3 5 chunks +10 lines, -9 lines 0 comments Download
M webkit/plugins/ppapi/ppb_broker_impl.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_broker_impl.cc View 1 2 3 2 chunks +3 lines, -7 lines 0 comments Download
M webkit/plugins/ppapi/ppb_directory_reader_impl.h View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M webkit/plugins/ppapi/ppb_directory_reader_impl.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_chooser_impl.h View 1 2 3 4 5 6 2 chunks +9 lines, -9 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_chooser_impl.cc View 1 2 3 4 5 6 6 chunks +7 lines, -12 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_io_impl.h View 1 2 3 2 chunks +34 lines, -27 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_io_impl.cc View 1 2 3 11 chunks +35 lines, -26 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_ref_impl.h View 1 2 3 4 5 6 1 chunk +12 lines, -8 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_ref_impl.cc View 1 2 3 4 5 6 5 chunks +7 lines, -13 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_system_impl.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_system_impl.cc View 1 2 3 3 chunks +6 lines, -8 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_menu_impl.h View 1 2 3 2 chunks +5 lines, -4 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_menu_impl.cc View 1 2 3 2 chunks +2 lines, -8 lines 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.cc View 1 2 3 2 chunks +3 lines, -8 lines 0 comments Download
M webkit/plugins/ppapi/ppb_layer_compositor_impl.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/ppb_layer_compositor_impl.cc View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_url_loader_impl.h View 1 2 3 3 chunks +13 lines, -10 lines 0 comments Download
M webkit/plugins/ppapi/ppb_url_loader_impl.cc View 1 2 3 6 chunks +14 lines, -13 lines 0 comments Download
M webkit/plugins/ppapi/ppb_video_capture_impl.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/ppb_video_capture_impl.cc View 1 2 3 4 5 6 3 chunks +4 lines, -7 lines 0 comments Download
M webkit/plugins/ppapi/ppb_video_decoder_impl.h View 1 2 3 4 5 6 1 chunk +7 lines, -4 lines 0 comments Download
M webkit/plugins/ppapi/ppb_video_decoder_impl.cc View 1 2 3 4 5 6 4 chunks +4 lines, -12 lines 0 comments Download
M webkit/plugins/ppapi/ppb_websocket_impl.h View 1 2 3 1 chunk +12 lines, -9 lines 0 comments Download
M webkit/plugins/ppapi/ppb_websocket_impl.cc View 1 2 3 4 5 6 6 chunks +8 lines, -19 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
dmichael (off chromium)
I still am going to make a clean-up pass, since I'm sure I left some ...
8 years, 8 months ago (2012-04-18 22:26:33 UTC) #1
dmichael (off chromium)
Okay, I think it's fully ready to go now. Sorry for the hugeness. Most of ...
8 years, 8 months ago (2012-04-19 20:02:00 UTC) #2
brettw
http://codereview.chromium.org/10081020/diff/12001/ppapi/shared_impl/api_callback_type.h File ppapi/shared_impl/api_callback_type.h (right): http://codereview.chromium.org/10081020/diff/12001/ppapi/shared_impl/api_callback_type.h#newcode13 ppapi/shared_impl/api_callback_type.h:13: typedef scoped_refptr<TrackedCallback> ApiCallbackType; Personally, I find using this to ...
8 years, 8 months ago (2012-04-20 18:24:29 UTC) #3
dmichael (off chromium)
PTAL when you're bored... not high priority. http://codereview.chromium.org/10081020/diff/12001/ppapi/shared_impl/api_callback_type.h File ppapi/shared_impl/api_callback_type.h (right): http://codereview.chromium.org/10081020/diff/12001/ppapi/shared_impl/api_callback_type.h#newcode13 ppapi/shared_impl/api_callback_type.h:13: typedef scoped_refptr<TrackedCallback> ...
8 years, 7 months ago (2012-05-16 22:18:29 UTC) #4
brettw
http://codereview.chromium.org/10081020/diff/12001/ppapi/thunk/enter.h File ppapi/thunk/enter.h (right): http://codereview.chromium.org/10081020/diff/12001/ppapi/thunk/enter.h#newcode162 ppapi/thunk/enter.h:162: Resource* resource_; Can you put a big scary warning ...
8 years, 7 months ago (2012-05-20 17:46:46 UTC) #5
dmichael (off chromium)
A couple of notes and a question before I dive in to updating the patch. ...
8 years, 7 months ago (2012-05-22 18:08:38 UTC) #6
brettw
http://codereview.chromium.org/10081020/diff/17285/ppapi/thunk/enter.cc File ppapi/thunk/enter.cc (right): http://codereview.chromium.org/10081020/diff/17285/ppapi/thunk/enter.cc#newcode128 ppapi/thunk/enter.cc:128: SetStateForCallbackError(report_error); On 2012/05/22 18:08:39, dmichael wrote: > On 2012/05/20 ...
8 years, 6 months ago (2012-06-01 21:11:31 UTC) #7
dmichael (off chromium)
https://chromiumcodereview.appspot.com/10081020/diff/17285/ppapi/thunk/enter.h File ppapi/thunk/enter.h (right): https://chromiumcodereview.appspot.com/10081020/diff/17285/ppapi/thunk/enter.h#newcode68 ppapi/thunk/enter.h:68: static void AssertLockHeld() { On 2012/05/20 17:46:46, brettw wrote: ...
8 years, 6 months ago (2012-06-22 18:14:04 UTC) #8
brettw
lgtm
8 years, 6 months ago (2012-06-22 19:12:34 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/10081020/52002
8 years, 6 months ago (2012-06-23 02:05:54 UTC) #10
commit-bot: I haz the power
Try job failure for 10081020-52002 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 6 months ago (2012-06-23 04:31:49 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/10081020/52002
8 years, 6 months ago (2012-06-23 12:43:57 UTC) #12
commit-bot: I haz the power
8 years, 6 months ago (2012-06-23 14:27:45 UTC) #13
Change committed as 143806

Powered by Google App Engine
This is Rietveld 408576698