OLD | NEW |
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // from .dll loading. The NaCl process will attempt to locate this space by | 174 // from .dll loading. The NaCl process will attempt to locate this space by |
175 // scanning the address space using VirtualQuery. | 175 // scanning the address space using VirtualQuery. |
176 // TODO(bbudge) Handle the --no-sandbox case. | 176 // TODO(bbudge) Handle the --no-sandbox case. |
177 // http://code.google.com/p/nativeclient/issues/detail?id=2131 | 177 // http://code.google.com/p/nativeclient/issues/detail?id=2131 |
178 const SIZE_T kNaClSandboxSize = 1 << 30; | 178 const SIZE_T kNaClSandboxSize = 1 << 30; |
179 if (!nacl::AllocateAddressSpaceASLR(process, kNaClSandboxSize)) { | 179 if (!nacl::AllocateAddressSpaceASLR(process, kNaClSandboxSize)) { |
180 DLOG(WARNING) << "Failed to reserve address space for Native Client"; | 180 DLOG(WARNING) << "Failed to reserve address space for Native Client"; |
181 } | 181 } |
182 } | 182 } |
183 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 183 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
184 content::ZygoteHandle* GetZygote() override { | 184 content::ZygoteHandle GetZygote() override { |
185 return content::GetGenericZygote(); | 185 return content::GetGenericZygote(); |
186 } | 186 } |
187 #endif // OS_WIN | 187 #endif // OS_WIN |
188 }; | 188 }; |
189 | 189 |
190 void CloseFile(base::File file) { | 190 void CloseFile(base::File file) { |
191 // The base::File destructor will close the file for us. | 191 // The base::File destructor will close the file for us. |
192 } | 192 } |
193 | 193 |
194 } // namespace | 194 } // namespace |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 NaClStartDebugExceptionHandlerThread( | 1129 NaClStartDebugExceptionHandlerThread( |
1130 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), | 1130 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), |
1131 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1131 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1132 weak_factory_.GetWeakPtr())); | 1132 weak_factory_.GetWeakPtr())); |
1133 return true; | 1133 return true; |
1134 } | 1134 } |
1135 } | 1135 } |
1136 #endif | 1136 #endif |
1137 | 1137 |
1138 } // namespace nacl | 1138 } // namespace nacl |
OLD | NEW |