Closed Bug 959818 Opened 10 years ago Closed 10 years ago

Make DumpJSStack dump out all frames

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

DumpJSStack callers presumably would like to see the whole thing.
r? bholley because I don't know if this can be called from somewhere that doesn't want the full stack.
Attachment #8360029 - Flags: review?(bobbyholley+bmo)
We should make this work even if there is no cx on the stack (e.g. we're spinning the event loop)...  Might be a separate bug.
An even fancier version: this one even compiles!

I tried calling it. Seemed to produce something sensible, though I don't think I had multiple contexts on the stack.
Attachment #8360042 - Flags: review?(bobbyholley+bmo)
Attachment #8360029 - Attachment is obsolete: true
Attachment #8360029 - Flags: review?(bobbyholley+bmo)
Comment on attachment 8360042 [details] [diff] [review]
Make DumpJSStack dump out all frames

Review of attachment 8360042 [details] [diff] [review]:
-----------------------------------------------------------------

FormatStackDump is only called in one place. Can we just change the iter there, rather than adding a whole new function?
Attachment #8360042 - Flags: review?(bobbyholley+bmo) → review-
Blocks: 819765
Sorry, I shouldn't sit on this forever.
Attachment #8460981 - Flags: review?(bobbyholley)
Attachment #8360042 - Attachment is obsolete: true
Attachment #8460981 - Flags: review?(bobbyholley) → review+
Could this change be backported to Firefox 31 ESR when fixed?

Today I was trying to troubleshoot an issue where a website that I am working on crashes Firefox 31.0. (It runs fine in Firefox 30.0.) Due to this issue, I cannot print the JS stack trace in gdb to know what is causing the crash.

I have tested Firefox 32 builds and the issue is fixed in that branch. Normally I would just wait for FF32 to be released (currently scheduled for September 1), but much to my dismay, I discovered that Firefox 31.0 was the branch point for a new ESR line, and I am experiencing the same crash in Firefox 31.0 ESR.
(In reply to Daniel Trebbien from comment #6)
> Could this change be backported to Firefox 31 ESR when fixed?

SGTM. Can you do that Steve?
Oh, I am sorry. I commented on the wrong bug report. My comment actually applies to Bug 1015339.
Finally landed this.

https://hg.mozilla.org/integration/mozilla-inbound/rev/78268b8c6e83

Note that currently, I often see

  Hit MOZ_CRASH(nsXPConnect not thread-safe) at /home/sfink/src/MI-GC/js/xpconnect/src/nsXPConnect.cpp:50

when calling DumpJSStack() (with or without this patch.) I don't see a bug on that; I'll file it.
https://hg.mozilla.org/mozilla-central/rev/78268b8c6e83
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.