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

Unified Diff: content/browser/renderer_host/render_sandbox_host_linux.cc

Issue 8776053: Plumb executable flag through proxy to base::SharedMemory::Create. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reword comment 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 | « no previous file | content/common/child_process_sandbox_support_impl_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_sandbox_host_linux.cc
diff --git a/content/browser/renderer_host/render_sandbox_host_linux.cc b/content/browser/renderer_host/render_sandbox_host_linux.cc
index ae052fac93fa506403964c59785301d5ca83ef67..6d953b9a6057db7609e80e24925579705895d13e 100644
--- a/content/browser/renderer_host/render_sandbox_host_linux.cc
+++ b/content/browser/renderer_host/render_sandbox_host_linux.cc
@@ -373,12 +373,14 @@ class SandboxIPCProcess {
void HandleMakeSharedMemorySegment(int fd, const Pickle& pickle, void* iter,
std::vector<int>& fds) {
- uint32_t shm_size;
- if (!pickle.ReadUInt32(&iter, &shm_size))
+ base::SharedMemoryCreateOptions options;
+ if (!pickle.ReadUInt32(&iter, &options.size))
+ return;
+ if (!pickle.ReadBool(&iter, &options.executable))
return;
int shm_fd = -1;
base::SharedMemory shm;
- if (shm.CreateAnonymous(shm_size))
+ if (shm.Create(options))
shm_fd = shm.handle().fd;
Pickle reply;
SendRendererReply(fds, reply, shm_fd);
« no previous file with comments | « no previous file | content/common/child_process_sandbox_support_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698