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

Unified Diff: src/js/string.js

Issue 2018963002: [builtins] Migrate String.prototype.trim/trimLeft/trimRight to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Franziskas comments. Created 4 years, 7 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/builtins.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/string.js
diff --git a/src/js/string.js b/src/js/string.js
index 249b99d48a5d2605c7cfcf662681dd0ad1a1351c..33a3e72143ca5020c8a9441d6a9b08f63c581f04 100644
--- a/src/js/string.js
+++ b/src/js/string.js
@@ -518,25 +518,6 @@ function StringToLocaleUpperCase() {
return %StringToUpperCase(TO_STRING(this));
}
-// ES5, 15.5.4.20
-function StringTrimJS() {
- CHECK_OBJECT_COERCIBLE(this, "String.prototype.trim");
-
- return %StringTrim(TO_STRING(this), true, true);
-}
-
-function StringTrimLeft() {
- CHECK_OBJECT_COERCIBLE(this, "String.prototype.trimLeft");
-
- return %StringTrim(TO_STRING(this), true, false);
-}
-
-function StringTrimRight() {
- CHECK_OBJECT_COERCIBLE(this, "String.prototype.trimRight");
-
- return %StringTrim(TO_STRING(this), false, true);
-}
-
// ES6 draft, revision 26 (2014-07-18), section B.2.3.2.1
function HtmlEscape(str) {
@@ -850,9 +831,6 @@ utils.InstallFunctions(GlobalString.prototype, DONT_ENUM, [
"toLocaleLowerCase", StringToLocaleLowerCase,
"toUpperCase", StringToUpperCaseJS,
"toLocaleUpperCase", StringToLocaleUpperCase,
- "trim", StringTrimJS,
- "trimLeft", StringTrimLeft,
- "trimRight", StringTrimRight,
"link", StringLink,
"anchor", StringAnchor,
« no previous file with comments | « src/builtins.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698