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

Unified Diff: src/harmony-string.js

Issue 742963002: Rename String.prototype.contains to 'includes'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test262-es6 tests Created 6 years, 1 month 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 | « no previous file | test/js-perf-test/Strings/harmony-string.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-string.js
diff --git a/src/harmony-string.js b/src/harmony-string.js
index 1c477e2fa5c996fc279a3b8bac500286da8eb9c0..c4717df5dbdbf86c0584b3c52ea3e8fdba433698 100644
--- a/src/harmony-string.js
+++ b/src/harmony-string.js
@@ -95,14 +95,14 @@ function StringEndsWith(searchString /* position */) { // length == 1
// ES6 draft 04-05-14, section 21.1.3.6
-function StringContains(searchString /* position */) { // length == 1
- CHECK_OBJECT_COERCIBLE(this, "String.prototype.contains");
+function StringIncludes(searchString /* position */) { // length == 1
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.includes");
var s = TO_STRING_INLINE(this);
if (IS_REGEXP(searchString)) {
throw MakeTypeError("first_argument_not_regexp",
- ["String.prototype.contains"]);
+ ["String.prototype.includes"]);
}
var ss = TO_STRING_INLINE(searchString);
@@ -184,7 +184,7 @@ function ExtendStringPrototype() {
// Set up the non-enumerable functions on the String prototype object.
InstallFunctions($String.prototype, DONT_ENUM, $Array(
"codePointAt", StringCodePointAt,
- "contains", StringContains,
+ "includes", StringIncludes,
"endsWith", StringEndsWith,
"repeat", StringRepeat,
"startsWith", StringStartsWith
« no previous file with comments | « no previous file | test/js-perf-test/Strings/harmony-string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698