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

Unified Diff: components/nacl/loader/nacl_listener.cc

Issue 1090233003: Set up a NaCl load status callback to start replacing "start_module". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use the enum instead of int Created 5 years, 8 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 | « components/nacl/loader/nacl_listener.h ('k') | components/nacl/renderer/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_listener.cc
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc
index 4a58a1ce49bcd8a2814fab35a611bdf91ecd2028..4cf4a3ed2e8435964d729a4c5ca75e6464c4949e 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -69,6 +69,12 @@ void FatalLogHandler(const char* data, size_t bytes) {
copy_bytes);
}
+void LoadStatusCallback(int load_status) {
+ g_listener->trusted_listener()->Send(
+ new NaClRendererMsg_ReportLoadStatus(
+ static_cast<NaClErrorCode>(load_status)));
+}
+
#if defined(OS_MACOSX)
// On Mac OS X, shm_open() works in the sandbox but does not give us
@@ -420,6 +426,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
args->debug_stub_server_port_selected_handler_func =
DebugStubPortSelectedHandler;
#endif
+ args->load_status_handler_func = LoadStatusCallback;
#if defined(OS_LINUX)
args->prereserved_sandbox_size = prereserved_sandbox_size_;
#endif
« no previous file with comments | « components/nacl/loader/nacl_listener.h ('k') | components/nacl/renderer/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698