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

Unified Diff: base/shared_memory_posix.cc

Issue 8800025: Adaptively use temp dir instead of /dev/shm for executable shmem file on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up per review Created 9 years 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 | « base/file_util_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/shared_memory_posix.cc
diff --git a/base/shared_memory_posix.cc b/base/shared_memory_posix.cc
index 030061a04c94fe22824c6fd9017506bb479391c2..a66c859e703c4cf2fcb27dc1de1eb1724643a368 100644
--- a/base/shared_memory_posix.cc
+++ b/base/shared_memory_posix.cc
@@ -123,7 +123,7 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
DCHECK(!options.open_existing);
// Q: Why not use the shm_open() etc. APIs?
// A: Because they're limited to 4mb on OS X. FFFFFFFUUUUUUUUUUU
- fp = file_util::CreateAndOpenTemporaryShmemFile(&path);
+ fp = file_util::CreateAndOpenTemporaryShmemFile(&path, options.executable);
// Deleting the file prevents anyone else from mapping it in
// (making it private), and prevents the need for cleanup (once
@@ -317,7 +317,7 @@ bool SharedMemory::FilePathForMemoryName(const std::string& mem_name,
DCHECK_EQ(std::string::npos, mem_name.find('\0'));
FilePath temp_dir;
- if (!file_util::GetShmemTempDir(&temp_dir))
+ if (!file_util::GetShmemTempDir(&temp_dir, false))
return false;
#if !defined(OS_MACOSX)
« no previous file with comments | « base/file_util_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698