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

Side by Side Diff: components/nacl/browser/nacl_process_host.cc

Issue 1643533006: Use a single, generic, global zygote to temporarily resolve perf regressions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused ppapi header Created 4 years, 10 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | content/browser/browser_main_loop.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/nacl/browser/nacl_process_host.h" 5 #include "components/nacl/browser/nacl_process_host.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // scanning the address space using VirtualQuery. 179 // scanning the address space using VirtualQuery.
180 // TODO(bbudge) Handle the --no-sandbox case. 180 // TODO(bbudge) Handle the --no-sandbox case.
181 // http://code.google.com/p/nativeclient/issues/detail?id=2131 181 // http://code.google.com/p/nativeclient/issues/detail?id=2131
182 const SIZE_T kNaClSandboxSize = 1 << 30; 182 const SIZE_T kNaClSandboxSize = 1 << 30;
183 if (!nacl::AllocateAddressSpaceASLR(process, kNaClSandboxSize)) { 183 if (!nacl::AllocateAddressSpaceASLR(process, kNaClSandboxSize)) {
184 DLOG(WARNING) << "Failed to reserve address space for Native Client"; 184 DLOG(WARNING) << "Failed to reserve address space for Native Client";
185 } 185 }
186 } 186 }
187 #elif defined(OS_POSIX) 187 #elif defined(OS_POSIX)
188 #if !defined(OS_MACOSX) 188 #if !defined(OS_MACOSX)
189 content::ZygoteHandle* GetZygote() override { return &g_nacl_zygote; } 189 content::ZygoteHandle* GetZygote() override {
190 return content::GetGenericZygote();
191 }
190 #endif // !defined(OS_MACOSX) 192 #endif // !defined(OS_MACOSX)
191 193
192 base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); } 194 base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); }
193 #endif // OS_WIN 195 #endif // OS_WIN
194 196
195 private: 197 private:
196 #if defined(OS_POSIX) 198 #if defined(OS_POSIX)
197 base::ScopedFD ipc_fd_; 199 base::ScopedFD ipc_fd_;
198 #endif // OS_POSIX 200 #endif // OS_POSIX
199 }; 201 };
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 NaClStartDebugExceptionHandlerThread( 1332 NaClStartDebugExceptionHandlerThread(
1331 process.Pass(), info, base::ThreadTaskRunnerHandle::Get(), 1333 process.Pass(), info, base::ThreadTaskRunnerHandle::Get(),
1332 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, 1334 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker,
1333 weak_factory_.GetWeakPtr())); 1335 weak_factory_.GetWeakPtr()));
1334 return true; 1336 return true;
1335 } 1337 }
1336 } 1338 }
1337 #endif 1339 #endif
1338 1340
1339 } // namespace nacl 1341 } // namespace nacl
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698