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

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: Add ppb_message_loop_shared.cc/.h 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698