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

Unified Diff: src/js/string.js

Issue 1419813010: [runtime] Remove the very dangerous %_CallFunction intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/js/proxy.js ('k') | src/js/templates.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 0fdd7ae342f88225165304c25920a4ba574445f2..1a31fd1df31e11edddf015e7ee5af1ae31906b3f 100644
--- a/src/js/string.js
+++ b/src/js/string.js
@@ -179,11 +179,10 @@ function StringNormalizeJS() {
var form = IS_UNDEFINED(formArg) ? 'NFC' : TO_STRING(formArg);
var NORMALIZATION_FORMS = ['NFC', 'NFD', 'NFKC', 'NFKD'];
- var normalizationForm =
- %_CallFunction(NORMALIZATION_FORMS, form, ArrayIndexOf);
+ var normalizationForm = %_Call(ArrayIndexOf, NORMALIZATION_FORMS, form);
if (normalizationForm === -1) {
throw MakeRangeError(kNormalizationForm,
- %_CallFunction(NORMALIZATION_FORMS, ', ', ArrayJoin));
+ %_Call(ArrayJoin, NORMALIZATION_FORMS, ', '));
}
return s;
@@ -803,7 +802,7 @@ function StringFromCharCode(code) {
// ES6 draft, revision 26 (2014-07-18), section B.2.3.2.1
function HtmlEscape(str) {
- return %_CallFunction(TO_STRING(str), /"/g, """, StringReplace);
+ return %_Call(StringReplace, TO_STRING(str), /"/g, """);
}
« no previous file with comments | « src/js/proxy.js ('k') | src/js/templates.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698