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

Unified Diff: test/mjsunit/array-push.js

Issue 1699005: Current custom call generators cannot cope with the case when receiver is not a JSArray. (Closed)
Patch Set: Fix typo Created 10 years, 8 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 | « test/mjsunit/array-pop.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-push.js
diff --git a/test/mjsunit/array-push.js b/test/mjsunit/array-push.js
index baccf000c4708cb2c69eaac50ef0f966f5a8cbe3..2a25a9cc9e31eaeab85273ce0a5f95f35533565f 100644
--- a/test/mjsunit/array-push.js
+++ b/test/mjsunit/array-push.js
@@ -103,3 +103,13 @@
assertEquals(29, a.push(29));
}
})();
+
+// Test the case of not JSArray receiver.
+// Regression test for custom call generators, see issue 684.
+(function() {
+ var x = {__proto__: []};
+ for (var i = 0; i < 100; i++) {
+ x.push("a");
+ assertEquals(i + 1, x.length, i + 'th iteration');
+ }
+})();
« no previous file with comments | « test/mjsunit/array-pop.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698