OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium 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 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime" | 7 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime" |
8 | 8 |
9 #include "native_client/src/trusted/plugin/service_runtime.h" | 9 #include "native_client/src/trusted/plugin/service_runtime.h" |
10 | 10 |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 | 720 |
721 nacl::scoped_ptr<SelLdrLauncherChrome> | 721 nacl::scoped_ptr<SelLdrLauncherChrome> |
722 tmp_subprocess(new SelLdrLauncherChrome()); | 722 tmp_subprocess(new SelLdrLauncherChrome()); |
723 if (NULL == tmp_subprocess.get()) { | 723 if (NULL == tmp_subprocess.get()) { |
724 NaClLog(LOG_ERROR, "ServiceRuntime::Start (subprocess create failed)\n"); | 724 NaClLog(LOG_ERROR, "ServiceRuntime::Start (subprocess create failed)\n"); |
725 params.error_info->SetReport( | 725 params.error_info->SetReport( |
726 ERROR_SEL_LDR_CREATE_LAUNCHER, | 726 ERROR_SEL_LDR_CREATE_LAUNCHER, |
727 "ServiceRuntime: failed to create sel_ldr launcher"); | 727 "ServiceRuntime: failed to create sel_ldr launcher"); |
728 return false; | 728 return false; |
729 } | 729 } |
| 730 nacl::string error_message; |
730 bool started = tmp_subprocess->Start(plugin_->pp_instance(), | 731 bool started = tmp_subprocess->Start(plugin_->pp_instance(), |
731 params.url.c_str(), | 732 params.url.c_str(), |
732 params.uses_irt, | 733 params.uses_irt, |
733 params.uses_ppapi, | 734 params.uses_ppapi, |
734 params.enable_dev_interfaces, | 735 params.enable_dev_interfaces, |
735 params.enable_dyncode_syscalls, | 736 params.enable_dyncode_syscalls, |
736 params.enable_exception_handling); | 737 params.enable_exception_handling, |
| 738 &error_message); |
737 if (!started) { | 739 if (!started) { |
738 NaClLog(LOG_ERROR, "ServiceRuntime::Start (start failed)\n"); | 740 NaClLog(LOG_ERROR, "ServiceRuntime::Start (start failed)\n"); |
739 params.error_info->SetReport(ERROR_SEL_LDR_LAUNCH, | 741 params.error_info->SetReportWithConsoleOnlyError( |
740 "ServiceRuntime: failed to start"); | 742 ERROR_SEL_LDR_LAUNCH, |
| 743 "ServiceRuntime: failed to start", |
| 744 error_message); |
741 return false; | 745 return false; |
742 } | 746 } |
743 | 747 |
744 subprocess_.reset(tmp_subprocess.release()); | 748 subprocess_.reset(tmp_subprocess.release()); |
745 NaClLog(4, "ServiceRuntime::StartSelLdr (return 1)\n"); | 749 NaClLog(4, "ServiceRuntime::StartSelLdr (return 1)\n"); |
746 return true; | 750 return true; |
747 } | 751 } |
748 | 752 |
749 void ServiceRuntime::WaitForSelLdrStart() { | 753 void ServiceRuntime::WaitForSelLdrStart() { |
750 nacl::MutexLocker take(&mu_); | 754 nacl::MutexLocker take(&mu_); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 | 874 |
871 nacl::string ServiceRuntime::GetCrashLogOutput() { | 875 nacl::string ServiceRuntime::GetCrashLogOutput() { |
872 if (NULL != subprocess_.get()) { | 876 if (NULL != subprocess_.get()) { |
873 return subprocess_->GetCrashLogOutput(); | 877 return subprocess_->GetCrashLogOutput(); |
874 } else { | 878 } else { |
875 return std::string(); | 879 return std::string(); |
876 } | 880 } |
877 } | 881 } |
878 | 882 |
879 } // namespace plugin | 883 } // namespace plugin |
OLD | NEW |