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

Unified Diff: test/mjsunit/indexed-accessors.js

Issue 5959009: Allow getters and setters on JSArray elements. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 12 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
Index: test/mjsunit/indexed-accessors.js
===================================================================
--- test/mjsunit/indexed-accessors.js (revision 6157)
+++ test/mjsunit/indexed-accessors.js (working copy)
@@ -81,19 +81,6 @@
expected[0] = 111;
testArray();
-// The functionality is not implemented for arrays due to performance issues.
-var a = [ 1 ];
-a.__defineGetter__('2', function() { return 7; });
-assertEquals(undefined, a[2]);
-assertEquals(1, a.length);
-var b = 0;
-a.__defineSetter__('5', function(y) { b = y; });
-assertEquals(1, a.length);
-a[5] = 42;
-assertEquals(0, b);
-assertEquals(42, a[5]);
-assertEquals(6, a.length);
-
// Using a setter where only a getter is defined throws an exception.
var q = {};
q.__defineGetter__('0', function() { return 42; });
« src/objects.cc ('K') | « src/objects.cc ('k') | test/mjsunit/regress/regress-900.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698