Index: base/memory/shared_memory_helper.cc |
diff --git a/base/memory/shared_memory_helper.cc b/base/memory/shared_memory_helper.cc |
index 87c3d3670845a6f47bb47dddbebd91ef9f646b62..d2108082149ebf6d44bd7c764a494c7684987d9d 100644 |
--- a/base/memory/shared_memory_helper.cc |
+++ b/base/memory/shared_memory_helper.cc |
@@ -25,8 +25,7 @@ using ScopedPathUnlinker = |
bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options, |
ScopedFILE* fp, |
ScopedFD* readonly_fd, |
- FilePath* path, |
- SharedMemoryError* error) { |
+ FilePath* path) { |
#if !(defined(OS_MACOSX) && !defined(OS_IOS)) |
// It doesn't make sense to have a open-existing private piece of shmem |
DCHECK(!options.open_existing_deprecated); |
@@ -35,16 +34,13 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options, |
// A: Because they're limited to 4mb on OS X. FFFFFFFUUUUUUUUUUU |
FilePath directory; |
ScopedPathUnlinker path_unlinker; |
- if (!GetShmemTempDir(options.executable, &directory)) { |
- *error = SharedMemoryError::NO_TEMP_DIR; |
+ if (!GetShmemTempDir(options.executable, &directory)) |
return false; |
- } |
fp->reset(base::CreateAndOpenTemporaryFileInDir(directory, path)); |
- if (!*fp) { |
- *error = SharedMemoryError::NO_FILE; |
+ |
+ if (!*fp) |
return false; |
- } |
// Deleting the file prevents anyone else from mapping it in (making it |
// private), and prevents the need for cleanup (once the last fd is |
@@ -57,7 +53,6 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options, |
if (!readonly_fd->is_valid()) { |
DPLOG(ERROR) << "open(\"" << path->value() << "\", O_RDONLY) failed"; |
fp->reset(); |
- *error = SharedMemoryError::MAKE_READONLY_FAILED; |
return false; |
} |
} |
@@ -67,14 +62,11 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options, |
bool PrepareMapFile(ScopedFILE fp, |
ScopedFD readonly_fd, |
int* mapped_file, |
- int* readonly_mapped_file, |
- SharedMemoryError* error) { |
+ int* readonly_mapped_file) { |
DCHECK_EQ(-1, *mapped_file); |
DCHECK_EQ(-1, *readonly_mapped_file); |
- if (!fp) { |
- *error = SharedMemoryError::NO_FILE; |
+ if (fp == NULL) |
return false; |
- } |
// This function theoretically can block on the disk, but realistically |
// the temporary files we create will just go into the buffer cache |
@@ -91,7 +83,6 @@ bool PrepareMapFile(ScopedFILE fp, |
NOTREACHED(); |
if (st.st_dev != readonly_st.st_dev || st.st_ino != readonly_st.st_ino) { |
LOG(ERROR) << "writable and read-only inodes don't match; bailing"; |
- *error = SharedMemoryError::INODE_MISMATCH; |
return false; |
} |
} |