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

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_object.cc

Issue 19717004: [NaCl SDK] Add nacl_io and sdk_util namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad copyright in mount_mem Created 7 years, 5 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
Index: native_client_sdk/src/libraries/nacl_io/kernel_object.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_object.cc b/native_client_sdk/src/libraries/nacl_io/kernel_object.cc
index bb67154b62ea4841b4d04087235b823fd405e94d..44b90a555b147ec15060080f2a02a75b4eae9036 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_object.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_object.cc
@@ -22,6 +22,8 @@
#include "sdk_util/ref_object.h"
#include "sdk_util/scoped_ref.h"
+namespace nacl_io {
+
KernelObject::KernelObject() {
cwd_ = "/";
}
@@ -182,7 +184,7 @@ void KernelObject::FreeAndReassignFD(int fd, const ScopedKernelHandle& handle) {
// If the required FD is larger than the current set, grow the set
if (fd >= handle_map_.size())
- handle_map_.resize(fd + 1, ScopedRef<KernelHandle>());
+ handle_map_.resize(fd + 1);
handle_map_[fd] = handle;
}
@@ -197,3 +199,5 @@ void KernelObject::FreeFD(int fd) {
// Force lower numbered FD to be available first.
std::push_heap(free_fds_.begin(), free_fds_.end(), std::greater<int>());
}
+
+} // namespace nacl_io
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_object.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698