arguments.callee and strict mode

Erik Arvidsson erik.arvidsson at gmail.com
Tue Mar 10 17:40:04 PDT 2009


On Tue, Mar 10, 2009 at 11:11, Brendan Eich <brendan at mozilla.com> wrote:

> Named function expressions and definitions are better, no question (now that
> ES3.1 adopts the de-facto fix pioneered by Opera of not binding a named
> function expression's name in an Object instance created as if by "new
> Object"). I pointed to the numerous uses of callee to ask whether other Ajax
> library authors are on board. Many read this list.

We use arguments.callee.caller in a few places to get a call stack and
we rely on this feature to be able to analyze errors in production.

Spidermonkey has a stack property on the error object so we are ok in
Firefox. Until all js engines have this (or some equivalent feature) I
don't think we can stop using arguments.callee :'(

Didn't we already cover this? I feel like we are going around in circles.

-- 
erik


More information about the Es-discuss mailing list