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

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: merge 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 648b94bc03d5f794ce9dcc65514367f6c0757da6..7652946c2b671033243589c7d8eb717a6a53e5eb 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);
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/mount_node.h ('k') | native_client_sdk/src/libraries/nacl_mounts/nacl_mounts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698