Index: components/nacl/loader/nacl_listener.cc |
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc |
index 433d9417d2abd291e532156de13b676ba6c57a4c..65011775fe95e3e0e2f7a22aa7d1e8020f500e53 100644 |
--- a/components/nacl/loader/nacl_listener.cc |
+++ b/components/nacl/loader/nacl_listener.cc |
@@ -117,6 +117,10 @@ void DebugStubPortSelectedHandler(uint16_t port) { |
#endif |
+void FatalLogHandler(const char* buf, size_t bytes) { |
+ NaClTrustedListener::Get()->SendFatalCrashLog(std::string(buf, bytes)); |
+} |
+ |
// Creates the PPAPI IPC channel between the NaCl IRT and the host |
// (browser/renderer) process, and starts to listen it on the thread where |
// the given message_loop_proxy runs. |
@@ -281,6 +285,9 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { |
struct NaClApp* nap = NULL; |
NaClChromeMainInit(); |
+ |
+ NaClSetFatalErrorCallback(&FatalLogHandler); |
+ |
nap = NaClAppCreate(); |
if (nap == NULL) { |
LOG(ERROR) << "NaClAppCreate() failed"; |