Closed Bug 1448693 Opened 7 years ago Closed 7 years ago

DumpJSStack() output not visible on Android

Categories

(Core :: XPConnect, enhancement, P2)

All
Android
enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: JanH, Assigned: JanH)

Details

Attachments

(1 file)

No description provided.
Comment on attachment 8962188 [details] Bug 1448693 - Make DumpJSStack() output appear somewhere visible on Android. https://reviewboard.mozilla.org/r/231030/#review236726 r=me with my question addressed about the best way to dump to logcat. ::: js/xpconnect/src/XPCDebug.cpp:35 (Diff revision 1) > if (IsDebuggerPresent()) { > OutputDebugStringA(buffer); > } > #endif > +#ifdef ANDROID > + printf_stderr("%s", buffer); nsGlobalWindowInner::Dump uses `__android_log_write(ANDROID_LOG_INFO, "GeckoDump", [buffer]);` as well as printf. Would it make sense to use the same output method here as well?
Attachment #8962188 - Flags: review?(mrbkap) → review+
Comment on attachment 8962188 [details] Bug 1448693 - Make DumpJSStack() output appear somewhere visible on Android. https://reviewboard.mozilla.org/r/231030/#review236726 > nsGlobalWindowInner::Dump uses `__android_log_write(ANDROID_LOG_INFO, "GeckoDump", [buffer]);` as well as printf. Would it make sense to use the same output method here as well? Are you referring to using `__android_log_write` directly vs. using it indirectly via `printf_stderr`, or whether to use stderr/logcat *in addition* or *instead of* printf on Android (or both)?
Comment on attachment 8962188 [details] Bug 1448693 - Make DumpJSStack() output appear somewhere visible on Android. https://reviewboard.mozilla.org/r/231030/#review236726 > Are you referring to using `__android_log_write` directly vs. using it indirectly via `printf_stderr`, or whether to use stderr/logcat *in addition* or *instead of* printf on Android (or both)? Although thinking some more about it, I guess I should do both - use `__android_log_write` directly with a custom Logtag (GeckoJS ?) and write to the logcat *in addition* to stdout, so if anybody wants to redirect the latter to somewhere else, they can still get the output as well.
(In reply to Jan Henning [:JanH] from comment #4) > Although thinking some more about it, I guess I should do both - use > `__android_log_write` directly with a custom Logtag (GeckoJS ?) and write to > the logcat *in addition* to stdout, so if anybody wants to redirect the > latter to somewhere else, they can still get the output as well. Yeah -- more generally it seems like the two `dump`s should mirror each other so that they behave similarly.
Priority: -- → P2
Pushed by mozilla@buttercookie.de: https://hg.mozilla.org/integration/autoland/rev/a18353aa563c Make DumpJSStack() output appear somewhere visible on Android. r=mrbkap
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: