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

Unified Diff: src/string.js

Issue 1274653002: Ensure `String.prototype.normalize.length` is `0` (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update as per @rossberg’s feedback Created 5 years, 4 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/i18n.js ('k') | test/intl/string/normalization.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index b543a8e2a27b2848b6cd0e07a7ab8e4950b8eca3..dd2b9d7b9cae7c315279a8ba7ac9d02f68ed9025 100644
--- a/src/string.js
+++ b/src/string.js
@@ -189,10 +189,11 @@ function StringMatchJS(regexp) {
// For now we do nothing, as proper normalization requires big tables.
// If Intl is enabled, then i18n.js will override it and provide the the
// proper functionality.
-function StringNormalizeJS(form) {
+function StringNormalizeJS() {
CHECK_OBJECT_COERCIBLE(this, "String.prototype.normalize");
- var form = IS_UNDEFINED(form) ? 'NFC' : TO_STRING_INLINE(form);
+ var formArg = %_Arguments(0);
+ var form = IS_UNDEFINED(formArg) ? 'NFC' : TO_STRING_INLINE(formArg);
var NORMALIZATION_FORMS = ['NFC', 'NFD', 'NFKC', 'NFKD'];
var normalizationForm =
« no previous file with comments | « src/i18n.js ('k') | test/intl/string/normalization.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698