Author: olehougaard
Date: Mon Mar 9 08:52:56 2009
New Revision: 1457
Modified:
branches/bleeding_edge/src/objects.cc
branches/bleeding_edge/test/mjsunit/top-level-assignments.js
Log:
Allocate getters and setters in old space to avoid failing assertion in
TransformToFastProperties.
Review URL: http://codereview.chromium.org/39344
Modified: branches/bleeding_edge/src/objects.cc
==============================================================================
--- branches/bleeding_edge/src/objects.cc (original)
+++ branches/bleeding_edge/src/objects.cc Mon Mar 9 08:52:56 2009
@@ -2532,7 +2532,7 @@
if (ok->IsFailure()) return ok;
// Allocate the fixed array to hold getter and setter.
- Object* array = Heap::AllocateFixedArray(2);
+ Object* array = Heap::AllocateFixedArray(2, TENURED);
if (array->IsFailure()) return array;
// Update the dictionary with the new CALLBACKS property.
Modified: branches/bleeding_edge/test/mjsunit/top-level-assignments.js
==============================================================================
--- branches/bleeding_edge/test/mjsunit/top-level-assignments.js
(original)
+++ branches/bleeding_edge/test/mjsunit/top-level-assignments.js Mon Mar
9
08:52:56 2009
@@ -94,3 +94,14 @@
assertEquals(10, calc.difference());
assertEquals(200, calc.product());
assertEquals(2, calc.quotient());
+
+var x = new Object();
+x.__defineGetter__('a', function() { return 7 });
+x.b = function() { return 42; };
+x.c = 88;
+x.d = "A Man Called Horse";
+
+assertEquals(7, x.a);
+assertEquals(42, x.b());
+assertEquals(88, x.c);
+assertEquals("A Man Called Horse", x.d);
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---