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); |