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

Unified Diff: ppapi/thunk/ppb_file_io_thunk.cc

Issue 14161017: Pepper: Simplify idl_thunk implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: on_failure comment nit Created 7 years, 8 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
« no previous file with comments | « ppapi/thunk/ppb_content_decryptor_private_thunk.cc ('k') | ppapi/thunk/ppb_find_dev_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_file_io_thunk.cc
diff --git a/ppapi/thunk/ppb_file_io_thunk.cc b/ppapi/thunk/ppb_file_io_thunk.cc
index 2f7d1493fc8164aaf77ee36d4ef7257a806906d0..331d190ca817871e92c188905b0a41500501dc5a 100644
--- a/ppapi/thunk/ppb_file_io_thunk.cc
+++ b/ppapi/thunk/ppb_file_io_thunk.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// From ppb_file_io.idl modified Mon Mar 18 13:58:22 2013.
+// From ppb_file_io.idl modified Tue Apr 16 11:25:44 2013.
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
@@ -120,8 +120,9 @@ int32_t Flush(PP_Resource file_io, struct PP_CompletionCallback callback) {
void Close(PP_Resource file_io) {
VLOG(4) << "PPB_FileIO::Close()";
EnterResource<PPB_FileIO_API> enter(file_io, true);
- if (enter.succeeded())
- enter.object()->Close();
+ if (enter.failed())
+ return;
+ enter.object()->Close();
}
int32_t ReadToArray(PP_Resource file_io,
« no previous file with comments | « ppapi/thunk/ppb_content_decryptor_private_thunk.cc ('k') | ppapi/thunk/ppb_find_dev_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698