On Wed, Jul 28, 2010 at 1:59 AM, Michael Day <[email protected]> wrote:
> Any comments on this code:
>
> try
> {
>    throw eval;
> }
> catch (x)
> {
>    alert(x("3"));
> }

ES3 and ES5 require the same behavior for this code. Firefox
implements that. Not much to say.

> It does not appear to throw an EvalError in Firefox 3.6.7, even though many
> other indirect uses of eval will.

What did you have in mind? It should be pretty hard to get us to throw
an EvalError. I think we throw sometimes if you pass two or more
arguments to eval, or if you arrange to have eval called
not-from-script (e.g. using it as an event handler). So, don't do
that.

-j
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to