[Webkit-unassigned] [Bug 11545] Disable the old testcases do not follow the ECMA-262v3 specification.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 10 06:22:59 PST 2006


http://bugs.webkit.org/show_bug.cgi?id=11545





------- Comment #4 from digdog at macports.org  2006-11-10 06:22 PDT -------
File:///WebKit/JavaScriptCore/tests/mozilla/js1_2/function/Number.js has one
test:

Number([1,2,3]); // js1.2 expected: 3

According to ECMA 9.3, when input type was Object, should call
ToPrimitive(input arg, hint Number) first, and than ToNumber() later. However,
ToPrimitive() will use [[DefaultValue]](hint) rule when input Type was Object
(ECMA 8.6.2.6). So the input [1,2,3] will applied [[DefaultValue]](hint) rule
with hint Number, and it looks like this:

toString(valuOf([1,2,3]))  => toString(1,2,3) => '1,2,3'

Than ToNumber('1,2,3') results NaN based on ECMA 9.3.1: If the grammar cannot
interpret the 
string as an expansion of StringNumericLiteral, then the result of ToNumber is
NaN.


-- 
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