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

Unified Diff: native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc

Issue 474433005: [NaCl SDK] Remove syscalls wrappers for chmod and unlink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/kernel_intercept.h » ('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/html5fs/html5_fs.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc b/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc
index f7a622fd7467226e3963461f0610f0e73d8dabd8..00d2e934aebf06ad51db64ff52ac0c4679ca527a 100644
--- a/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc
+++ b/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc
@@ -180,6 +180,8 @@ Html5Fs::Html5Fs()
}
Error Html5Fs::Init(const FsInitArgs& args) {
+ pthread_cond_init(&filesystem_open_cond_, NULL);
+
Error error = Filesystem::Init(args);
if (error)
return error;
@@ -204,8 +206,6 @@ Error Html5Fs::Init(const FsInitArgs& args) {
return ENOSYS;
}
- pthread_cond_init(&filesystem_open_cond_, NULL);
-
// Parse filesystem args.
PP_FileSystemType filesystem_type = PP_FILESYSTEMTYPE_LOCALPERSISTENT;
int64_t expected_size = 0;
@@ -277,7 +277,8 @@ Error Html5Fs::Init(const FsInitArgs& args) {
}
void Html5Fs::Destroy() {
- ppapi_->ReleaseResource(filesystem_resource_);
+ if (ppapi_ != NULL && filesystem_resource_ != 0)
+ ppapi_->ReleaseResource(filesystem_resource_);
pthread_cond_destroy(&filesystem_open_cond_);
}
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/kernel_intercept.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698