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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.cc

Issue 8770023: Break FileIO and URLLoader tests down into individual cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Break FileIO and URLLoader tests down into individual cases. Created 9 years 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 | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/tests/test_url_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.cc
===================================================================
--- ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.cc (revision 113334)
+++ ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.cc (working copy)
@@ -159,8 +159,8 @@
offset, bytes_to_read);
if (bytes_to_read < 0)
- bytes_to_read = 0;
- nacl_abi_size_t buffer_size = bytes_to_read;
+ return PP_ERROR_FAILED;
+ nacl_abi_size_t buffer_size = static_cast<nacl_abi_size_t>(bytes_to_read);
int32_t callback_id =
CompletionCallbackTable::Get()->AddCallback(callback, buffer);
@@ -196,7 +196,7 @@
offset, bytes_to_write);
if (bytes_to_write < 0)
- bytes_to_write = 0;
+ return PP_ERROR_FAILED;
nacl_abi_size_t buffer_size = static_cast<nacl_abi_size_t>(bytes_to_write);
int32_t callback_id =
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/tests/test_url_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698