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

Unified Diff: ppapi/cpp/completion_callback.h

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/c/pp_completion_callback.h ('k') | ppapi/cpp/resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/completion_callback.h
diff --git a/ppapi/cpp/completion_callback.h b/ppapi/cpp/completion_callback.h
index 2391a3a5e1b506e61ba69d3a4ff801ff545cf267..ec892f6f650b981b1a6a22b1dbb8b0cf131b6324 100644
--- a/ppapi/cpp/completion_callback.h
+++ b/ppapi/cpp/completion_callback.h
@@ -99,7 +99,7 @@ class CompletionCallback {
/// On synchronous method completion, the completion result will be returned
/// by the method itself. Otherwise, the method will return
/// PP_OK_COMPLETIONPENDING, and the callback will be invoked asynchronously
- /// on the main thread of Pepper execution.
+ /// on the same thread where the PPB method was invoked.
///
/// @return true if this callback is optional, otherwise false.
bool IsOptional() const {
@@ -150,6 +150,7 @@ class CompletionCallback {
int32_t MayForce(int32_t result) const {
if (result == PP_OK_COMPLETIONPENDING || IsOptional())
return result;
+ // FIXME(dmichael): Use pp::MessageLoop here once it's out of Dev.
Module::Get()->core()->CallOnMainThread(0, *this, result);
return PP_OK_COMPLETIONPENDING;
}
« no previous file with comments | « ppapi/c/pp_completion_callback.h ('k') | ppapi/cpp/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698