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

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

Issue 315583005: Pepper: Simplify error reporting in PnaclResources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/pnacl_resources.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc b/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
index 7868f4a56d31b872cdb6555a460c257b13e10615..8651c1718df55edde3aab7a0975a149a543bf03b 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
@@ -41,9 +41,11 @@ void PnaclResources::ReadResourceInfo(
"chrome://pnacl-translator/pnacl.json",
&pp_llc_tool_name_var,
&pp_ld_tool_name_var)) {
- coordinator_->ExitWithError();
+ pp::Module::Get()->core()->CallOnMainThread(0,
+ resource_info_read_cb,
+ PP_ERROR_FAILED);
+ return;
}
-
pp::Var llc_tool_name(pp::PASS_REF, pp_llc_tool_name_var);
pp::Var ld_tool_name(pp::PASS_REF, pp_ld_tool_name_var);
llc_tool_name_ = GetFullUrl(llc_tool_name.AsString());
@@ -76,14 +78,6 @@ void PnaclResources::StartLoad(
int32_t result = PP_OK;
if (llc_file_handle_ == PP_kInvalidFileHandle ||
ld_file_handle_ == PP_kInvalidFileHandle) {
- // File-open failed. Assume this means that the file is
- // not actually installed. This shouldn't actually occur since
- // ReadResourceInfo() fail first.
- coordinator_->ReportNonPpapiError(
- PP_NACL_ERROR_PNACL_RESOURCE_FETCH,
- nacl::string("The Portable Native Client (pnacl) component is not "
- "installed. Please consult chrome://components for more "
- "information."));
result = PP_ERROR_FILENOTFOUND;
}
pp::Module::Get()->core()->CallOnMainThread(0, all_loaded_callback, result);

Powered by Google App Engine
This is Rietveld 408576698