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

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

Issue 8585002: Give base::SharedMemory::CreateAnonymous an executable flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes 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
« base/shared_memory.h ('K') | « base/shared_memory_win.cc ('k') | no next file » | 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
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index 8bc8b991e13273b90ac1f65fd9cced58ef05d9b4..c84f416468d9d293c9eb143b90c3c7b3aab38b77 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -492,7 +492,10 @@ void NaClProcessHost::SendStart(base::PlatformFile irt_file) {
// 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)) {
+ base::SharedMemoryCreateOptions options;
+ options.size = 1;
+ options.executable = true;
+ if (!memory_buffer.Create(options)) {
LOG(ERROR) << "Failed to allocate memory buffer";
delete this;
return;
« base/shared_memory.h ('K') | « base/shared_memory_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698