Index: src/js/runtime.js |
diff --git a/src/js/runtime.js b/src/js/runtime.js |
index 0a73fc40cceb0cca172a7e4b3b69bd970e808fbb..eeb887aff4cba2c110cfbe1eddf246e0a1f48db1 100644 |
--- a/src/js/runtime.js |
+++ b/src/js/runtime.js |
@@ -43,11 +43,11 @@ utils.ImportFromExperimental(function(from) { |
// ES5, section 9.12 |
function SameValue(x, y) { |
- if (typeof x != typeof y) return false; |
+ if (typeof x !== typeof y) return false; |
if (IS_NUMBER(x)) { |
if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true; |
// x is +0 and y is -0 or vice versa. |
- if (x === 0 && y === 0 && %_IsMinusZero(x) != %_IsMinusZero(y)) { |
+ if (x === 0 && y === 0 && 1/x !== 1/y) { |
return false; |
} |
} |
@@ -58,7 +58,7 @@ function SameValue(x, y) { |
// ES6, section 7.2.4 |
function SameValueZero(x, y) { |
- if (typeof x != typeof y) return false; |
+ if (typeof x !== typeof y) return false; |
if (IS_NUMBER(x)) { |
if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true; |
} |