Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: src/harmony-array-includes.js

Issue 1378533002: [es6] Introduce %ToInteger and %ToLength. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/harmony-array.js ('k') | src/harmony-atomics.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-array-includes.js
diff --git a/src/harmony-array-includes.js b/src/harmony-array-includes.js
index 124edf62ecd405d9796043e486f0892710c521f6..a6b59137d217f6a4c961333bca2220f554d0a6f6 100644
--- a/src/harmony-array-includes.js
+++ b/src/harmony-array-includes.js
@@ -20,7 +20,7 @@ function InnerArrayIncludes(searchElement, fromIndex, array, length) {
return false;
}
- var n = $toInteger(fromIndex);
+ var n = TO_INTEGER(fromIndex);
var k;
if (n >= 0) {
@@ -49,7 +49,7 @@ function ArrayIncludes(searchElement, fromIndex) {
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.includes");
var array = TO_OBJECT(this);
- var length = $toLength(array.length);
+ var length = TO_LENGTH(array.length);
return InnerArrayIncludes(searchElement, fromIndex, array, length);
}
« no previous file with comments | « src/harmony-array.js ('k') | src/harmony-atomics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698