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

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

Issue 19271009: [NaCl SDK} Add EventListener and EventEmitter to support epoll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing stdint for windows 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_handle.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc b/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
index 12b83a3dcdb23e66c5d1ace1c517c8959a0aa933..d83555822fba1397b709886fdbb8424fa130a492 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
@@ -21,6 +21,12 @@ KernelHandle::KernelHandle()
KernelHandle::KernelHandle(const ScopedMount& mnt, const ScopedMountNode& node)
: mount_(mnt), node_(node), offs_(0) {}
+KernelHandle::~KernelHandle() {
+ // Force release order, so that mount persists beyond node
+ node_.reset(NULL);
+ mount_.reset(NULL);
+}
+
Error KernelHandle::Init(int open_mode) {
if (open_mode & O_APPEND) {
size_t node_size;

Powered by Google App Engine
This is Rietveld 408576698