Permalink
Browse files

Bug 712341 - Make dump in workers show up in adb logcat. r=bent

--HG--
extra : rebase_source : c17d8195b47dd908fa98e371b12647ccfccfc760
  • Loading branch information...
mrbkap committed Dec 7, 2011
1 parent 4f4df85 commit e32c094ed4d9ecbaa5c7f851a223e30919ec2b7e
Showing with 14 additions and 1 deletion.
  1. +8 −1 dom/workers/WorkerPrivate.cpp
  2. +6 −0 dom/workers/WorkerScope.cpp
@@ -79,6 +79,9 @@
#include "Worker.h"
#include "WorkerFeature.h"
#include "WorkerScope.h"
+#ifdef ANDROID
+#include <android/log.h>
+#endif
#include "WorkerInlines.h"
@@ -1149,7 +1152,11 @@ class ReportErrorRunnable : public WorkerRunnable
}
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);
}
@@ -61,6 +61,9 @@
#include "Worker.h"
#include "WorkerPrivate.h"
#include "XMLHttpRequest.h"
+#ifdef ANDROID
+#include <android/log.h>
+#endif
#include "WorkerInlines.h"
@@ -517,6 +520,9 @@ class WorkerGlobalScope : public events::EventTarget
return false;
}
+#ifdef ANDROID
+ __android_log_print(ANDROID_LOG_INFO, "Gecko", buffer.ptr());
+#endif
fputs(buffer.ptr(), stderr);
fflush(stderr);
}

0 comments on commit e32c094

Please sign in to comment.