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

Unified Diff: ppapi/proxy/ppb_testing_proxy.cc

Issue 10910099: PPAPI: Make CompletionCallbacks work right on background threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | ppapi/shared_impl/ppapi_globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_testing_proxy.cc
diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc
index b8c9ce07d3afb86a866fe26d4ccd89448197d25b..576302f97b97071ba8f78547f4b75b1e27ed4907 100644
--- a/ppapi/proxy/ppb_testing_proxy.cc
+++ b/ppapi/proxy/ppb_testing_proxy.cc
@@ -53,12 +53,14 @@ PP_Bool ReadImageData(PP_Resource graphics_2d,
void RunMessageLoop(PP_Instance instance) {
MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
- // TODO(dmichael): We should probably assert that this is the main thread.
+ CHECK(PpapiGlobals::Get()->GetMainThreadMessageLoop()->
+ BelongsToCurrentThread());
MessageLoop::current()->Run();
}
void QuitMessageLoop(PP_Instance instance) {
- // TODO(dmichael): We should probably assert that this is the main thread.
+ CHECK(PpapiGlobals::Get()->GetMainThreadMessageLoop()->
+ BelongsToCurrentThread());
MessageLoop::current()->QuitNow();
}
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | ppapi/shared_impl/ppapi_globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698