-Fixed regression in S15.5.5.1_A5.js.
I eliminated the fast case check in ToPrimitive. Review URL: http://codereview.chromium.org/6534 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
6afa5c64b7
commit
6a76d3c448
@ -396,8 +396,7 @@ function TO_STRING() {
|
||||
function ToPrimitive(x, hint) {
|
||||
// Fast case check.
|
||||
if (IS_STRING(x)) return x;
|
||||
if ((hint != NUMBER_HINT) && %IsStringClass(x)) return %_ValueOf(x);
|
||||
// Normal behaior.
|
||||
// Normal behavior.
|
||||
if (!IS_OBJECT(x) && !IS_FUNCTION(x)) return x;
|
||||
if (x == null) return x; // check for null, undefined
|
||||
if (hint == NO_HINT) hint = (IS_DATE(x)) ? STRING_HINT : NUMBER_HINT;
|
||||
|
Loading…
Reference in New Issue
Block a user