[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:36:53 PST 2006


------- Comment #5 from digdog at macports.org  2006-11-10 06:36 PDT -------
File:///WebKit/JavaScriptCore/tests/mozilla/js1_2/function/String.js has 2

String({p:1}) //js1.2 expected: {p:1}
String([1,2,3]) //js1.2 expect: [1, 2, 3]

According to ECMA 9.8, when input type of String object argument was Object, we
should applied ToPrimitive(input arg, hint String) first, and later ToString()
. And just like previous one, ToPrimitive() will use [[DefaultValue]](hint)
with hint String to convert the input (toString() below uses the rule in ECMA

valueOf(toString({p:1}) => valueOf('[object Object]') => '[object Object]'
valueOf(toString([1,2,3])) => valueOf('1,2,3') => '1,2,3'

And ToString() called after ToPrimitive(), so the correct result would be:

[object Object]

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