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

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

Issue 22309007: Add success status to ReportTranslationFinished in ppb_nacl_private and IPC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jvoung, dmichael reviews Created 7 years, 4 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/c/private/ppb_nacl_private.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
index e5649f3dd8a89a388edbce54738e31b5271374f4..18b4faec4c2d4e9da747f2eef4f9e72b74c9b63e 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
@@ -336,13 +336,14 @@ void PnaclCoordinator::ExitWithError() {
void PnaclCoordinator::TranslateFinished(int32_t pp_error) {
PLUGIN_PRINTF(("PnaclCoordinator::TranslateFinished (pp_error=%"
NACL_PRId32 ")\n", pp_error));
- // Bail out if there was an earlier error (e.g., pexe load failure).
- if (translate_finish_error_ != PP_OK) {
- ExitWithError();
- return;
- }
- // Bail out if there is an error from the translation thread.
- if (pp_error != PP_OK) {
+ // Bail out if there was an earlier error (e.g., pexe load failure),
+ // or if there is an error from the translation thread.
+ if (translate_finish_error_ != PP_OK || pp_error != PP_OK) {
+ if (use_new_cache_) {
+ plugin_->nacl_interface()->ReportTranslationFinished(
+ plugin_->pp_instance(),
+ PP_FALSE);
+ }
ExitWithError();
return;
}
@@ -395,7 +396,7 @@ void PnaclCoordinator::TranslateFinished(int32_t pp_error) {
// Report to the browser that translation finished. The browser will take
// care of caching.
plugin_->nacl_interface()->ReportTranslationFinished(
- plugin_->pp_instance());
+ plugin_->pp_instance(), PP_TRUE);
NexeReadDidOpen(PP_OK);
return;
}
@@ -977,6 +978,11 @@ void PnaclCoordinator::BitcodeStreamDidFinish(int32_t pp_error) {
ss << "PnaclCoordinator: pexe load failed (pp_error=" << pp_error << ").";
error_info_.SetReport(ERROR_PNACL_PEXE_FETCH_OTHER, ss.str());
}
+ if (use_new_cache_) {
+ plugin_->nacl_interface()->ReportTranslationFinished(
+ plugin_->pp_instance(),
+ PP_FALSE);
+ }
translate_thread_->AbortSubprocesses();
} else {
// Compare download completion pct (100% now), to compile completion pct.
@@ -1051,6 +1057,11 @@ void PnaclCoordinator::ObjectFileDidOpen(int32_t pp_error) {
ReportPpapiError(ERROR_PNACL_CREATE_TEMP,
pp_error,
"Failed to open scratch object file.");
+ if (use_new_cache_) {
+ plugin_->nacl_interface()->ReportTranslationFinished(
+ plugin_->pp_instance(),
+ PP_FALSE);
+ }
return;
}
// Open the nexe file for connecting ld and sel_ldr.
« no previous file with comments | « ppapi/c/private/ppb_nacl_private.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698