Ye olde arguments argument (was: Topic list - pending changes and issues for the ES3.1 spec)

Jon Zeppieri jaz at
Sat Sep 13 20:06:49 PDT 2008

On Sat, Sep 13, 2008 at 12:05 AM, Erik Arvidsson
<erik.arvidsson at> wrote:
> Inside Google we have a few occurrences of arguments.callee.  Some of
> these are from Prototype, MochiKit, jQuery and other third party code.
> I agree with Tobie regarding the 2 use cases but there is one more
> related use case and that is arguments.callee.caller and I know a lot
> of developers here rely on and that to be able to generate a stack
> trace.  This is crucial for fixing bugs in production systems.
> SpiderMonkey has the Error.prototype.stack property and if that was
> supported everywhere I don't think there would be any serious
> complaints about removing arguments.callee and
> arguments.callee.caller.

A standard way to get a stack trace would be very useful.  A
callee.caller-based stack trace will break under recursion, right?  So
it's not the right thing for traces anyway.

More information about the Es-discuss mailing list