[Webkit-unassigned] [Bug 13646] implement Error.prototype.stack

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 11 22:31:21 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=13646





------- Comment #9 from ggaren at apple.com  2009-05-11 22:31 PDT -------
(In reply to comment #8)
JavaScript implementations are already on the hook to be able to generate a
stack trace on demand, to support arguments.caller and Function.caller. So, a
"give me a stack trace, no really, I mean it" call / keyword should be no new
burden.

However, I do agree that adding a stack trace to every exception would be
serious new burden to apps that throw regularly. (Not sure how common those
are.)

Why not do roughly this, using existing APIs, instead:

function stack() {
var stack = [];
var caller = arguments.caller;
while (caller != null) {
stack.push(caller);
caller = caller.caller;
}
}


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list