OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/loader/nacl_listener.h" | 5 #include "components/nacl/loader/nacl_listener.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
261 void NaClListener::OnStart(const nacl::NaClStartParams& params) { | 261 void NaClListener::OnStart(const nacl::NaClStartParams& params) { |
262 #if defined(OS_LINUX) || defined(OS_MACOSX) | 262 #if defined(OS_LINUX) || defined(OS_MACOSX) |
263 int urandom_fd = dup(base::GetUrandomFD()); | 263 int urandom_fd = dup(base::GetUrandomFD()); |
264 if (urandom_fd < 0) { | 264 if (urandom_fd < 0) { |
265 LOG(ERROR) << "Failed to dup() the urandom FD"; | 265 LOG(ERROR) << "Failed to dup() the urandom FD"; |
266 return; | 266 return; |
267 } | 267 } |
268 NaClChromeMainSetUrandomFd(urandom_fd); | 268 NaClChromeMainSetUrandomFd(urandom_fd); |
269 #endif | 269 #endif |
270 | 270 |
271 NaClChromeMainInit(); | 271 if (params.uses_nonsfi_mode) |
272 NaClChromeMainInitForNonSfi(); | |
Mark Seaborn
2014/03/28 01:38:25
AFAICT, this function isn't defined, so this chang
hamaji
2014/03/28 12:06:10
Sorry, I forgot to publish this change (https://co
| |
273 else | |
274 NaClChromeMainInit(); | |
272 struct NaClChromeMainArgs *args = NaClChromeMainArgsCreate(); | 275 struct NaClChromeMainArgs *args = NaClChromeMainArgsCreate(); |
273 if (args == NULL) { | 276 if (args == NULL) { |
274 LOG(ERROR) << "NaClChromeMainArgsCreate() failed"; | 277 LOG(ERROR) << "NaClChromeMainArgsCreate() failed"; |
275 return; | 278 return; |
276 } | 279 } |
277 | 280 |
278 struct NaClApp *nap = NaClAppCreate(); | 281 struct NaClApp *nap = NaClAppCreate(); |
279 if (nap == NULL) { | 282 if (nap == NULL) { |
280 LOG(ERROR) << "NaClAppCreate() failed"; | 283 LOG(ERROR) << "NaClAppCreate() failed"; |
281 return; | 284 return; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
438 | 441 |
439 #if defined(OS_LINUX) | 442 #if defined(OS_LINUX) |
440 if (params.uses_nonsfi_mode) { | 443 if (params.uses_nonsfi_mode) { |
441 nacl::nonsfi::MainStart(args->imc_bootstrap_handle); | 444 nacl::nonsfi::MainStart(args->imc_bootstrap_handle); |
442 return; | 445 return; |
443 } | 446 } |
444 #endif | 447 #endif |
445 NaClChromeMainStartApp(nap, args); | 448 NaClChromeMainStartApp(nap, args); |
446 NOTREACHED(); | 449 NOTREACHED(); |
447 } | 450 } |
OLD | NEW |