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

Side by Side Diff: content/browser/worker_host/worker_process_host.cc

Issue 7714018: Give plug-in processes an executable heap and disable PIE/ASLR for Native (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/utility_process_host.cc ('k') | content/common/child_process_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/worker_host/worker_process_host.h" 5 #include "content/browser/worker_host/worker_process_host.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 } 112 }
113 113
114 ChildProcessSecurityPolicy::GetInstance()->Remove(id()); 114 ChildProcessSecurityPolicy::GetInstance()->Remove(id());
115 } 115 }
116 116
117 bool WorkerProcessHost::Init(int render_process_id) { 117 bool WorkerProcessHost::Init(int render_process_id) {
118 if (!CreateChannel()) 118 if (!CreateChannel())
119 return false; 119 return false;
120 120
121 FilePath exe_path = GetChildPath(true); 121 #if defined(OS_LINUX)
122 int flags = CHILD_ALLOW_SELF;
123 #else
124 int flags = CHILD_NORMAL;
125 #endif
126
127 FilePath exe_path = GetChildPath(flags);
122 if (exe_path.empty()) 128 if (exe_path.empty())
123 return false; 129 return false;
124 130
125 CommandLine* cmd_line = new CommandLine(exe_path); 131 CommandLine* cmd_line = new CommandLine(exe_path);
126 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kWorkerProcess); 132 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kWorkerProcess);
127 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); 133 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
128 134
129 static const char* const kSwitchNames[] = { 135 static const char* const kSwitchNames[] = {
130 switches::kWebWorkerShareProcesses, 136 switches::kWebWorkerShareProcesses,
131 switches::kDisableApplicationCache, 137 switches::kDisableApplicationCache,
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 } 638 }
633 } 639 }
634 return false; 640 return false;
635 } 641 }
636 642
637 WorkerProcessHost::WorkerInstance::FilterInfo 643 WorkerProcessHost::WorkerInstance::FilterInfo
638 WorkerProcessHost::WorkerInstance::GetFilter() const { 644 WorkerProcessHost::WorkerInstance::GetFilter() const {
639 DCHECK(NumFilters() == 1); 645 DCHECK(NumFilters() == 1);
640 return *filters_.begin(); 646 return *filters_.begin();
641 } 647 }
OLDNEW
« no previous file with comments | « content/browser/utility_process_host.cc ('k') | content/common/child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698