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

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: 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
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/pnacl_resources.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0e1a0695dadefff0876756f1553879898034cae7 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
@@ -9,7 +9,6 @@
#include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/native_client/src/trusted/plugin/plugin.h"
-#include "ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h"
#include "ppapi/native_client/src/trusted/plugin/utility.h"
namespace plugin {
@@ -41,9 +40,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 +77,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);
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/pnacl_resources.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698