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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/service_runtime.cc

Issue 18045007: Show more different NaCl loading errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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 if (error_message.empty()) {
740 "ServiceRuntime: failed to start"); 742 params.error_info->SetReport(ERROR_SEL_LDR_LAUNCH,
743 "ServiceRuntime: failed to start");
744 } else {
745 params.error_info->SetReport(ERROR_SEL_LDR_LAUNCH, error_message);
Mark Seaborn 2013/07/16 02:02:53 This error gets reported to untrusted Javascript v
halyavin 2013/07/16 08:04:35 Looks like you are right.
Mark Seaborn 2013/07/17 05:29:58 Yes, I think so, to avoid accidentally exposing se
halyavin 2013/07/17 13:12:16 Done.
746 }
741 return false; 747 return false;
742 } 748 }
743 749
744 subprocess_.reset(tmp_subprocess.release()); 750 subprocess_.reset(tmp_subprocess.release());
745 NaClLog(4, "ServiceRuntime::StartSelLdr (return 1)\n"); 751 NaClLog(4, "ServiceRuntime::StartSelLdr (return 1)\n");
746 return true; 752 return true;
747 } 753 }
748 754
749 void ServiceRuntime::WaitForSelLdrStart() { 755 void ServiceRuntime::WaitForSelLdrStart() {
750 nacl::MutexLocker take(&mu_); 756 nacl::MutexLocker take(&mu_);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 876
871 nacl::string ServiceRuntime::GetCrashLogOutput() { 877 nacl::string ServiceRuntime::GetCrashLogOutput() {
872 if (NULL != subprocess_.get()) { 878 if (NULL != subprocess_.get()) {
873 return subprocess_->GetCrashLogOutput(); 879 return subprocess_->GetCrashLogOutput();
874 } else { 880 } else {
875 return std::string(); 881 return std::string();
876 } 882 }
877 } 883 }
878 884
879 } // namespace plugin 885 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698