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

Unified Diff: src/js/string.js

Issue 2628963005: String.prototype.anchor and others should not cause side effects. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | test/mjsunit/regress/regress-5836.js » ('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 3a9254c7130858b24ea3177a3eb5d818149fa513..c0587350cd6d4730183398c094c1db517c3c5e3e 100644
--- a/src/js/string.js
+++ b/src/js/string.js
@@ -333,7 +333,7 @@ function StringToLocaleUpperCase() {
// ES6 draft, revision 26 (2014-07-18), section B.2.3.2.1
function HtmlEscape(str) {
- return %_Call(StringReplace, TO_STRING(str), /"/g, """);
+ return %RegExpInternalReplace(/"/g, TO_STRING(str), """);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5836.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698