Object.is should use SameValue
BUG=v8:3576 LOG= R=arv@chromium.org, svenpanne@chromium.org, wingo@igalia.com Review URL: https://codereview.chromium.org/626323002 Patch from Diego Pino <dpino@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ee64a14b24
commit
04c17602a4
@ -1363,13 +1363,9 @@ function ObjectIsExtensible(obj) {
|
||||
}
|
||||
|
||||
|
||||
// Harmony egal.
|
||||
// ECMA-262, Edition 6, section 19.1.2.10
|
||||
function ObjectIs(obj1, obj2) {
|
||||
if (obj1 === obj2) {
|
||||
return (obj1 !== 0) || (1 / obj1 === 1 / obj2);
|
||||
} else {
|
||||
return (obj1 !== obj1) && (obj2 !== obj2);
|
||||
}
|
||||
return SameValue(obj1, obj2);
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,8 +32,8 @@ function TestEgal(expected, x, y) {
|
||||
assertSame(expected, Object.is(x, y));
|
||||
}
|
||||
|
||||
var test_set = [ {}, [], 1/0, -1/0, "s", 0, 0/-1, null, undefined ];
|
||||
print(test_set);
|
||||
var test_set = [ {}, [], Infinity, -Infinity, "s", "ア", 0, 0/-1, null,
|
||||
undefined, true, false, Symbol("foo"), NaN ];
|
||||
for (var i = 0; i < test_set.length; i++) {
|
||||
for (var j = 0; j < test_set.length; j++) {
|
||||
if (i == j) {
|
||||
|
Loading…
Reference in New Issue
Block a user