Open Bug 1431967 Opened 7 years ago Updated 8 months ago

Consider adding a JS testing function that dumps C++ backtrace

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox60 --- fix-optional

People

(Reporter: arai, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

While debugging browser bugs (that may be multi-process), I often wanted to see C++ backtrace of the certain point in JS, to see how the code is executed (like, in which MicroTask checkpoint). so, it might be nice to have a testing function that dumps C++ function, inside Cu.getJSTestingFunctions(), similar to Cu.getJSTestingFunctions().backtrace() that dumps JS backtrace. something like: await promise_for_mousedown_event; Cu.getJSTestingFunctions().dumpNativeBacktrace();
Summary: Consider adding a testing function that dumps C++ backtrace → Consider adding a JS testing function that dumps C++ backtrace
https://searchfox.org/mozilla-central/rev/b7e3ec2468d42fa59d86c03ec7afeb209813f1d4/xpcom/base/nsTraceRefcnt.cpp#881 wcpan told me that there's similar function provided in C++. we could expose it via Components.utils.
fwiw, here's WIP patch that dumps backtrace, but I'll try nsTraceRefcnt::WalkTheStack's way.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: