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

Unified Diff: native_client_sdk/src/libraries/nacl_mounts/mount_node_html5fs.cc

Issue 11887021: [NaCl SDK] Add HTTP mount. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: docs for nacl_mounts.h Created 7 years, 11 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_mounts/mount_node_html5fs.cc
diff --git a/native_client_sdk/src/libraries/nacl_mounts/mount_node_html5fs.cc b/native_client_sdk/src/libraries/nacl_mounts/mount_node_html5fs.cc
index 0859882d65e1028378ed6bddcd10093ecaea9401..019a22f60438f7cdec78af85686e19ff61d66d34 100644
--- a/native_client_sdk/src/libraries/nacl_mounts/mount_node_html5fs.cc
+++ b/native_client_sdk/src/libraries/nacl_mounts/mount_node_html5fs.cc
@@ -76,24 +76,21 @@ int MountNodeHtml5Fs::GetDents(size_t offs, struct dirent* pdir, size_t size) {
return -1;
}
- PP_Resource directory_reader_resource =
- mount_->ppapi()->GetDirectoryReaderInterface()->Create(fileref_resource_);
- if (!directory_reader_resource) {
+ ScopedResource directory_reader(
+ mount_->ppapi(),
+ mount_->ppapi()->GetDirectoryReaderInterface()->Create(
+ fileref_resource_));
+ if (!directory_reader.pp_resource()) {
errno = ENOSYS;
return -1;
}
- ScopedResource scoped_directory_reader(
- mount_->ppapi(),
- directory_reader_resource,
- ScopedResource::NoAddRef());
-
std::vector<struct dirent> dirents;
PP_DirectoryEntry_Dev directory_entry = {0};
while (1) {
int32_t result =
mount_->ppapi()->GetDirectoryReaderInterface()->GetNextEntry(
- directory_reader_resource, &directory_entry,
+ directory_reader.pp_resource(), &directory_entry,
PP_BlockUntilComplete());
if (result != PP_OK) {
errno = PPErrorToErrno(result);

Powered by Google App Engine
This is Rietveld 408576698