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

Unified Diff: test/mjsunit/es6/arguments-iterator.js

Issue 1332873002: Fixing Sloppy Symbol.iterator setter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adding error handling Created 5 years, 3 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/accessors.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/arguments-iterator.js
diff --git a/test/mjsunit/es6/arguments-iterator.js b/test/mjsunit/es6/arguments-iterator.js
index cf1e1f97ca32242770c0d915fde276aca85b6920..602294e9fce22f9e157f02ba565260e5824fb4eb 100644
--- a/test/mjsunit/es6/arguments-iterator.js
+++ b/test/mjsunit/es6/arguments-iterator.js
@@ -160,6 +160,21 @@ function TestAssignmentToIterator() {
TestAssignmentToIterator(1, 2, 3, 4, 5);
+// Regression test for crbug.com/521484.
+function TestAssignmentToIterator2() {
+ var i = 0;
+ arguments.__defineGetter__('callee', function(){});
+ arguments.__defineGetter__('length', function(){ return 1 });
+ arguments[Symbol.iterator] = [].entries;
+ for (var entry of arguments) {
+ assertEquals([i, arguments[i]], entry);
+ i++;
+ }
+
+ assertEquals(arguments.length, i);
+}
+TestAssignmentToIterator2(1, 2, 3, 4, 5);
+
function TestArgumentsMutation() {
var i = 0;
for (var x of arguments) {
« no previous file with comments | « src/accessors.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698