[Webkit-unassigned] [Bug 10891] REGRESSION: eval("return 1") no longer works
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jan 21 18:25:13 PST 2007
http://bugs.webkit.org/show_bug.cgi?id=10891
------- Comment #2 from sanjay12 at gmail.com 2007-01-21 18:25 PDT -------
It seems that according to §10.1.2 and §12.9 of the ECMAScript Language Spec,
return statements are only valid in the context of a FunctionBody. An eval
statement is the equivalent of script executing in the context of a global
scope, and as such "return" is invalid. So even though this is a regression in
the sense that release Safari does not complain, the ToT behavior is the
correct behavior for specification conformance.
I additionally tested the script in Firefox and IE7, and both browsers
similarly complained about a return statement outside of a function. So given
the behavior of other browsers and the spec, this bug should probably be
resolved as invalid.
--
Configure bugmail: http://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