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

Unified Diff: native_client_sdk/src/libraries/nacl_io/memfs/mem_fs.cc

Issue 574803002: [NaCl SDK] nacl_io: Fix excess realloc'ing in memfs nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/memfs/mem_fs.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/memfs/mem_fs.cc b/native_client_sdk/src/libraries/nacl_io/memfs/mem_fs.cc
index 111dc6f2e396ea05114e7c0df8907c83a1134f69..118874dc18346112c28f035f1f709f4bb5742fb9 100644
--- a/native_client_sdk/src/libraries/nacl_io/memfs/mem_fs.cc
+++ b/native_client_sdk/src/libraries/nacl_io/memfs/mem_fs.cc
@@ -114,7 +114,7 @@ Error MemFs::OpenWithMode(const Path& path, int open_flags, mode_t mode,
return EEXIST;
if (open_flags & O_TRUNC)
- static_cast<MemFsNode*>(node.get())->Resize(0);
+ node->FTruncate(0);
}
*out_node = node;
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/memfs/mem_fs_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698