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

Unified Diff: ppapi/proxy/ppb_surface_3d_proxy.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/proxy/ppb_surface_3d_proxy.cc
===================================================================
--- ppapi/proxy/ppb_surface_3d_proxy.cc (revision 88104)
+++ ppapi/proxy/ppb_surface_3d_proxy.cc (working copy)
@@ -12,6 +12,7 @@
#include "ppapi/proxy/plugin_resource.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/ppb_context_3d_proxy.h"
+#include "ppapi/thunk/common.h"
namespace pp {
namespace proxy {
@@ -76,22 +77,23 @@
PP_CompletionCallback callback) {
Surface3D* object = PluginResource::GetAs<Surface3D>(surface_id);
if (!object)
- return PP_ERROR_BADRESOURCE;
+ return ppapi::thunk::MayForceCallback(callback, PP_ERROR_BADRESOURCE);
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(
object->instance());
if (!dispatcher)
- return PP_ERROR_FAILED;
+ return ppapi::thunk::MayForceCallback(callback, PP_ERROR_FAILED);
// For now, disallow blocking calls. We'll need to add support for other
// threads to this later.
if (!callback.func)
- return PP_ERROR_BADARGUMENT;
+ return ppapi::thunk::MayForceCallback(callback, PP_ERROR_BADARGUMENT);
if (object->is_flush_pending())
piman 2011/06/07 17:32:14 Add braces around the next 2 lines
polina 2011/06/09 23:53:51 Done.
- return PP_ERROR_INPROGRESS; // Can't have >1 flush pending.
+ // Can't have >1 flush pending.
+ return ppapi::thunk::MayForceCallback(callback, PP_ERROR_INPROGRESS);
if (!object->context())
- return PP_ERROR_FAILED;
+ return ppapi::thunk::MayForceCallback(callback, PP_ERROR_FAILED);
object->set_current_flush_callback(callback);

Powered by Google App Engine
This is Rietveld 408576698