Index: components/nacl/loader/nacl_listener.cc |
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc |
index 26585b166c0d617da6021b05d08fbd1a6b6c2675..104ced264a0a5f6d88820eebd584065e21f28981 100644 |
--- a/components/nacl/loader/nacl_listener.cc |
+++ b/components/nacl/loader/nacl_listener.cc |
@@ -19,6 +19,7 @@ |
#include "base/message_loop/message_loop.h" |
#include "base/rand_util.h" |
#include "components/nacl/common/nacl_messages.h" |
+#include "components/nacl/common/nacl_renderer_messages.h" |
#include "components/nacl/loader/nacl_ipc_adapter.h" |
#include "components/nacl/loader/nacl_validation_db.h" |
#include "components/nacl/loader/nacl_validation_query.h" |
@@ -418,5 +419,14 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { |
nexe_file_info.file_token.hi = params.nexe_token_hi; |
args->nexe_desc = NaClDescIoFromFileInfo(nexe_file_info, NACL_ABI_O_RDONLY); |
- NaClChromeMainStartApp(nap, args); |
+ int exit_status; |
+ if (!NaClChromeMainStart(nap, args, &exit_status)) |
+ NaClExit(1); |
+ |
+ // Report the plugin's exit status if the application started successfully. |
+ // TODO(teravest): Use a separate is_helper_process field instead of assuming |
Mark Seaborn
2014/08/21 21:12:32
How about sending it unconditionally but having Tr
teravest
2014/08/22 16:07:11
Done.
|
+ // the translator doesn't use the IRT. |
+ if (params.uses_irt) |
+ trusted_listener_->Send(new NaClRendererMsg_ReportExitStatus(exit_status)); |
+ NaClExit(exit_status); |
} |