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

Unified Diff: src/js/array-iterator.js

Issue 2188753002: Make Array.prototype[Symbol.iterator] non-constructible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/es6/array-prototype-values.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/array-iterator.js
diff --git a/src/js/array-iterator.js b/src/js/array-iterator.js
index 8203f1f9f5933e46727f4fab187c5e24665f2af2..ce2f2951ef3ba41d16a9c99f1cc00ec29f51f0d7 100644
--- a/src/js/array-iterator.js
+++ b/src/js/array-iterator.js
@@ -144,9 +144,11 @@ utils.InstallFunctions(GlobalArray.prototype, DONT_ENUM, [
'keys', ArrayKeys
]);
-// TODO(adam): Remove this call once 'values' is in the above
-// InstallFunctions block, as it'll be redundant.
+// TODO(adam): Remove these calls once 'values' is in the above
+// InstallFunctions block, as they'll be redundant.
utils.SetFunctionName(ArrayValues, 'values');
+%FunctionRemovePrototype(ArrayValues);
+%SetNativeFlag(ArrayValues);
%AddNamedProperty(GlobalArray.prototype, iteratorSymbol, ArrayValues,
DONT_ENUM);
« no previous file with comments | « no previous file | test/mjsunit/es6/array-prototype-values.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698