From e663351a815bc5a402a0e56e9848afbb18fa74e2 Mon Sep 17 00:00:00 2001 From: Blake Kaplan Date: Wed, 7 Dec 2011 02:29:34 -0800 Subject: [PATCH] Bug 712341 - Make dump in workers show up in adb logcat. r=bent --HG-- extra : rebase_source : c17d8195b47dd908fa98e371b12647ccfccfc760 --- dom/workers/WorkerPrivate.cpp | 9 ++++++++- dom/workers/WorkerScope.cpp | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index cc28173460c..40a0466e55f 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -79,6 +79,9 @@ #include "Worker.h" #include "WorkerFeature.h" #include "WorkerScope.h" +#ifdef ANDROID +#include +#endif #include "WorkerInlines.h" @@ -1149,7 +1152,11 @@ public: } if (!logged) { - fputs(NS_ConvertUTF16toUTF8(aMessage).get(), stderr); + NS_ConvertUTF16toUTF8 msg(aMessage); +#ifdef ANDROID + __android_log_print(ANDROID_LOG_INFO, "Gecko", msg.get()); +#endif + fputs(msg.get(), stderr); fflush(stderr); } diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index 694929cdc68..5be1fdf1e84 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -61,6 +61,9 @@ #include "Worker.h" #include "WorkerPrivate.h" #include "XMLHttpRequest.h" +#ifdef ANDROID +#include +#endif #include "WorkerInlines.h" @@ -517,6 +520,9 @@ private: return false; } +#ifdef ANDROID + __android_log_print(ANDROID_LOG_INFO, "Gecko", buffer.ptr()); +#endif fputs(buffer.ptr(), stderr); fflush(stderr); }