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

Unified Diff: ppapi/thunk/ppb_broker_thunk.cc

Issue 6899055: PPAPI: Force async callback invocation option. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months 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/thunk/ppb_broker_thunk.cc
===================================================================
--- ppapi/thunk/ppb_broker_thunk.cc (revision 90603)
+++ ppapi/thunk/ppb_broker_thunk.cc (working copy)
@@ -4,8 +4,9 @@
#include "ppapi/c/trusted/ppb_broker_trusted.h"
#include "ppapi/c/pp_errors.h"
+#include "ppapi/thunk/common.h"
+#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/thunk.h"
-#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_broker_api.h"
#include "ppapi/thunk/resource_creation_api.h"
@@ -30,8 +31,9 @@
PP_CompletionCallback connect_callback) {
EnterResource<PPB_Broker_API> enter(resource, true);
if (enter.failed())
- return PP_ERROR_BADRESOURCE;
- return enter.object()->Connect(connect_callback);
+ return MayForceCallback(connect_callback, PP_ERROR_BADRESOURCE);
+ int32_t result = enter.object()->Connect(connect_callback);
+ return MayForceCallback(connect_callback, result);
}
int32_t GetHandle(PP_Resource resource, int32_t* handle) {

Powered by Google App Engine
This is Rietveld 408576698