Bug 1129770 - Deprecated.jsm can log 'null 0 null' as part of it's stack trace. r=mak

Differential Revision: https://phabricator.services.mozilla.com/D130558
This commit is contained in:
sirri 2021-11-08 16:06:01 +00:00
parent 495dc60933
commit c2486c4847

View File

@ -37,7 +37,9 @@ function stringifyCallstack(aStack) {
let msg = "";
// Get every frame in the callstack.
while (frame) {
msg += frame.filename + " " + frame.lineNumber + " " + frame.name + "\n";
if (frame.filename || frame.lineNumber || frame.name) {
msg += frame.filename + " " + frame.lineNumber + " " + frame.name + "\n";
}
frame = frame.caller;
}
return msg;