Index: ppapi/thunk/ppb_file_io_trusted_thunk.cc |
=================================================================== |
--- ppapi/thunk/ppb_file_io_trusted_thunk.cc (revision 91178) |
+++ ppapi/thunk/ppb_file_io_trusted_thunk.cc (working copy) |
@@ -5,8 +5,9 @@ |
#include "ppapi/c/dev/ppb_file_io_trusted_dev.h" |
#include "ppapi/c/pp_completion_callback.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_file_io_api.h" |
#include "ppapi/thunk/resource_creation_api.h" |
@@ -28,8 +29,9 @@ |
PP_CompletionCallback callback) { |
EnterResource<PPB_FileIO_API> enter(file_io, true); |
if (enter.failed()) |
- return PP_ERROR_BADRESOURCE; |
- return enter.object()->WillWrite(offset, bytes_to_write, callback); |
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE); |
+ int32_t result = enter.object()->WillWrite(offset, bytes_to_write, callback); |
+ return MayForceCallback(callback, result); |
} |
int32_t WillSetLength(PP_Resource file_io, |
@@ -37,8 +39,9 @@ |
PP_CompletionCallback callback) { |
EnterResource<PPB_FileIO_API> enter(file_io, true); |
if (enter.failed()) |
- return PP_ERROR_BADRESOURCE; |
- return enter.object()->WillSetLength(length, callback); |
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE); |
+ int32_t result = enter.object()->WillSetLength(length, callback); |
+ return MayForceCallback(callback, result); |
} |
const PPB_FileIOTrusted_Dev g_ppb_file_io_trusted_thunk = { |