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

Unified Diff: ppapi/native_client/src/trusted/plugin/service_runtime.cc

Issue 282683002: Pepper: Simplify LaunchSelLdr error reporting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/src/trusted/plugin/service_runtime.cc
diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc
index 9b4d3f56dcdffa1e3667556bed422a2862828c4b..bfb2ed7a89ddd939373d9bba1f428b94efef38e6 100644
--- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc
+++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc
@@ -650,13 +650,11 @@ void ServiceRuntime::StartSelLdr(const SelLdrStartParams& params,
pp::Module::Get()->core()->CallOnMainThread(0, callback, PP_ERROR_FAILED);
return;
}
- pp::CompletionCallback internal_callback =
- callback_factory_.NewCallback(&ServiceRuntime::StartSelLdrContinuation,
- callback);
ManifestService* manifest_service =
new ManifestService(anchor_->Ref(), rev_interface_);
tmp_subprocess->Start(plugin_->pp_instance(),
+ main_service_runtime_,
params.url.c_str(),
params.uses_irt,
params.uses_ppapi,
@@ -667,33 +665,10 @@ void ServiceRuntime::StartSelLdr(const SelLdrStartParams& params,
params.enable_crash_throttling,
&kManifestServiceVTable,
manifest_service,
- &start_sel_ldr_error_message_,
- internal_callback);
+ callback);
subprocess_.reset(tmp_subprocess.release());
}
-void ServiceRuntime::StartSelLdrContinuation(int32_t pp_error,
- pp::CompletionCallback callback) {
- if (pp_error != PP_OK) {
- NaClLog(LOG_ERROR, "ServiceRuntime::StartSelLdrContinuation "
- " (start failed)\n");
- if (main_service_runtime_) {
- std::string error_message;
- pp::Var var_error_message_cpp(pp::PASS_REF, start_sel_ldr_error_message_);
- if (var_error_message_cpp.is_string()) {
- error_message = var_error_message_cpp.AsString();
- }
- ErrorInfo error_info;
- error_info.SetReportWithConsoleOnlyError(
- PP_NACL_ERROR_SEL_LDR_LAUNCH,
- "ServiceRuntime: failed to start",
- error_message);
- plugin_->ReportLoadError(error_info);
- }
- }
- pp::Module::Get()->core()->CallOnMainThread(0, callback, pp_error);
-}
-
bool ServiceRuntime::WaitForSelLdrStart() {
// Time to wait on condvar (for browser to create a new sel_ldr process on
// our behalf). Use 6 seconds to be *fairly* conservative.

Powered by Google App Engine
This is Rietveld 408576698