[Webkit-unassigned] [Bug 35722] 'window.eval' not treated as use of built-in eval operator

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 9 01:50:44 PST 2010


--- Comment #5 from Jon Davis <jon at jondavis.net>  2010-03-09 01:50:44 PST ---
(In reply to comment #4)
> If you change "window.eval" to "eval", Safari, Chrome, and Opera print "a
> string".
> The difference in behavior comes down to a question of what syntax counts as a
> use of the built-in eval operator, as opposed to a call to the built-in eval
> function. (Only uses of the built-in eval operator inherit local bindings like
> 'this'.)
> In Firefox and the current draft of the ES5 spec, any MemberExpression
> involving the keyword 'eval' counts as a use of the built-in eval operator. In
> Safari, Chrome, and Opera, only the Identifier 'eval' counts.
> The more expansive rule in the ES5 spec seems unwarranted, given the complexity
> it introduces, but I don't see too much harm in implementing it if anyone feels
> the urge.

Very interesting. I didn't realize there was an eval() outside of
window.eval(). Your observations are confirmed, works for me too. Good of you
to defer back to the ES spec, as I should've before I posted the bug.

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

More information about the webkit-unassigned mailing list