summaryrefslogtreecommitdiffstats
path: root/components/nacl/common
diff options
context:
space:
mode:
authorjvoung <jvoung@chromium.org>2015-04-22 16:24:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-22 23:24:27 +0000
commit6b7051836e5604d42723871b26c17146cc4f14c0 (patch)
tree71269fa5c21b0928c908739cc86c329e6f5e8760 /components/nacl/common
parentc0b00106efe0a3737148de518b77ba8273417e69 (diff)
downloadchromium_src-6b7051836e5604d42723871b26c17146cc4f14c0.zip
chromium_src-6b7051836e5604d42723871b26c17146cc4f14c0.tar.gz
chromium_src-6b7051836e5604d42723871b26c17146cc4f14c0.tar.bz2
Set up a NaCl load status callback to start replacing "start_module".
Uses the hook from: https://codereview.chromium.org/1089323006/ The NaClListener will set up a callback, and when the load status is known at the end of sel_main_chrome's LoadApp, it will use that to send the load_status to the renderer via Chrome IPC, instead of getting the load status from a "start_module" SRPC call. The renderer will use that load_status to report UMA stats and send progress events. This replaces the load_status coming from the SRPC "start_module::i" invocation. However, the invocation is kept for the moment because we currently block the sel_main_chrome until it is received to avoid a race condition. After this lands, we can remove the blocking and then remove the invocation. This also replaces the call to ReapLogs since that will be done once the load_status is known to be an error on the sel_main_chrome side instead. BUG= https://code.google.com/p/chromium/issues/detail?id=459250 Review URL: https://codereview.chromium.org/1090233003 Cr-Commit-Position: refs/heads/master@{#326393}
Diffstat (limited to 'components/nacl/common')
-rw-r--r--components/nacl/common/DEPS1
-rw-r--r--components/nacl/common/nacl_renderer_messages.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/components/nacl/common/DEPS b/components/nacl/common/DEPS
index e13224d..3b9fcea 100644
--- a/components/nacl/common/DEPS
+++ b/components/nacl/common/DEPS
@@ -1,3 +1,4 @@
include_rules = [
"+native_client/src/public",
+ "+native_client/src/trusted/service_runtime/nacl_error_code.h",
]
diff --git a/components/nacl/common/nacl_renderer_messages.h b/components/nacl/common/nacl_renderer_messages.h
index e07a082..265af86 100644
--- a/components/nacl/common/nacl_renderer_messages.h
+++ b/components/nacl/common/nacl_renderer_messages.h
@@ -6,6 +6,7 @@
// Multiply-included message file, no traditional include guard.
#include "ipc/ipc_message_macros.h"
+#include "native_client/src/trusted/service_runtime/nacl_error_code.h"
#define IPC_MESSAGE_START NaClHostMsgStart
@@ -13,3 +14,10 @@
// NaCl to the renderer before the NaCl process exits very soon after.
IPC_SYNC_MESSAGE_CONTROL1_0(NaClRendererMsg_ReportExitStatus,
int /* exit_status */)
+
+IPC_ENUM_TRAITS_MAX_VALUE(NaClErrorCode, NACL_ERROR_CODE_MAX)
+
+// This message must be synchronous to ensure that the load status is sent from
+// NaCl to the renderer before the NaCl process exits very soon after.
+IPC_SYNC_MESSAGE_CONTROL1_0(NaClRendererMsg_ReportLoadStatus,
+ NaClErrorCode /* load_status */)