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

Unified Diff: src/harmony-string.js

Issue 745543002: Revert of Rename String.prototype.contains to 'includes'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 c4717df5dbdbf86c0584b3c52ea3e8fdba433698..1c477e2fa5c996fc279a3b8bac500286da8eb9c0 100644
--- a/src/harmony-string.js
+++ b/src/harmony-string.js
@@ -95,14 +95,14 @@
// ES6 draft 04-05-14, section 21.1.3.6
-function StringIncludes(searchString /* position */) { // length == 1
- CHECK_OBJECT_COERCIBLE(this, "String.prototype.includes");
+function StringContains(searchString /* position */) { // length == 1
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.contains");
var s = TO_STRING_INLINE(this);
if (IS_REGEXP(searchString)) {
throw MakeTypeError("first_argument_not_regexp",
- ["String.prototype.includes"]);
+ ["String.prototype.contains"]);
}
var ss = TO_STRING_INLINE(searchString);
@@ -184,7 +184,7 @@
// Set up the non-enumerable functions on the String prototype object.
InstallFunctions($String.prototype, DONT_ENUM, $Array(
"codePointAt", StringCodePointAt,
- "includes", StringIncludes,
+ "contains", StringContains,
"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