| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "native_client/src/public/chrome_main.h" | 7 #include "native_client/src/public/chrome_main.h" |
| 8 | 8 |
| 9 #include "native_client/src/include/build_config.h" | 9 #include "native_client/src/include/build_config.h" |
| 10 #include "native_client/src/include/portability.h" | 10 #include "native_client/src/include/portability.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 * called. | 291 * called. |
| 292 */ | 292 */ |
| 293 NaClSetUpBootstrapChannel(nap, args->imc_bootstrap_handle); | 293 NaClSetUpBootstrapChannel(nap, args->imc_bootstrap_handle); |
| 294 } | 294 } |
| 295 | 295 |
| 296 CHECK(args->nexe_desc != NULL); | 296 CHECK(args->nexe_desc != NULL); |
| 297 NaClAppLoadModule(nap, args->nexe_desc, NULL, NULL); | 297 NaClAppLoadModule(nap, args->nexe_desc, NULL, NULL); |
| 298 NaClDescUnref(args->nexe_desc); | 298 NaClDescUnref(args->nexe_desc); |
| 299 args->nexe_desc = NULL; | 299 args->nexe_desc = NULL; |
| 300 | 300 |
| 301 if (has_bootstrap_channel) { | |
| 302 NACL_FI_FATAL("BeforeSecureCommandChannel"); | |
| 303 /* | |
| 304 * Spawns a thread that uses the command channel. | |
| 305 * Hereafter any changes to nap should be done while holding locks. | |
| 306 */ | |
| 307 NaClSecureCommandChannel(nap); | |
| 308 | |
| 309 NaClLog(4, "NaClSecureCommandChannel has spawned channel\n"); | |
| 310 | |
| 311 NaClLog(4, "secure service = %"NACL_PRIxPTR"\n", | |
| 312 (uintptr_t) nap->secure_service); | |
| 313 | |
| 314 } | |
| 315 | |
| 316 NACL_FI_FATAL("BeforeLoadIrt"); | 301 NACL_FI_FATAL("BeforeLoadIrt"); |
| 317 | 302 |
| 318 /* | 303 /* |
| 319 * error reporting done; can quit now if there was an error earlier. | 304 * error reporting done; can quit now if there was an error earlier. |
| 320 */ | 305 */ |
| 321 if (LOAD_OK == errcode) { | 306 if (LOAD_OK == errcode) { |
| 322 errcode = NaClGetLoadStatus(nap); | 307 errcode = NaClGetLoadStatus(nap); |
| 323 } | 308 } |
| 324 if (LOAD_OK != errcode) { | 309 if (LOAD_OK != errcode) { |
| 325 goto done; | 310 goto done; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 int NaClChromeMainStart(struct NaClApp *nap, | 445 int NaClChromeMainStart(struct NaClApp *nap, |
| 461 struct NaClChromeMainArgs *args, | 446 struct NaClChromeMainArgs *args, |
| 462 int *exit_status) { | 447 int *exit_status) { |
| 463 int load_ok = LOAD_OK == LoadApp(nap, args); | 448 int load_ok = LOAD_OK == LoadApp(nap, args); |
| 464 if (load_ok) { | 449 if (load_ok) { |
| 465 *exit_status = StartApp(nap, args); | 450 *exit_status = StartApp(nap, args); |
| 466 } | 451 } |
| 467 free(args); | 452 free(args); |
| 468 return load_ok; | 453 return load_ok; |
| 469 } | 454 } |
| OLD | NEW |