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

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

Issue 424893003: Pepper: Move NaCl fatal logging to Chrome IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for dmichael Created 6 years, 5 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
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";

Powered by Google App Engine
This is Rietveld 408576698