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

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 8598029: Revert 110361 - NaCl: preallocate shared-memory object on Linux as on MacOSX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | chrome/nacl/nacl_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/nacl_process_host.cc
===================================================================
--- chrome/browser/nacl_host/nacl_process_host.cc (revision 110775)
+++ chrome/browser/nacl_host/nacl_process_host.cc (working copy)
@@ -486,11 +486,11 @@
return;
}
-#if defined(OS_POSIX)
- // For dynamic loading support, NaCl requires a file descriptor on an
- // anonymous file that can have PROT_EXEC applied to its mappings.
- // Rather than requiring an extra IPC round trip out of the sandbox,
- // we create an FD here.
+#if defined(OS_MACOSX)
+ // For dynamic loading support, NaCl requires a file descriptor that
+ // was created in /tmp, since those created with shm_open() are not
+ // mappable with PROT_EXEC. Rather than requiring an extra IPC
+ // round trip out of the sandbox, we create an FD here.
base::SharedMemory memory_buffer;
if (!memory_buffer.CreateAnonymous(/* size= */ 1)) {
LOG(ERROR) << "Failed to allocate memory buffer";
« no previous file with comments | « no previous file | chrome/nacl/nacl_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698