Reviewers: Mads Ager, Description: Allocate getters and setters in old space to avoid failing assertion in TransformToFastProperties.
Please review this at http://codereview.chromium.org/39344 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/objects.cc M test/mjsunit/top-level-assignments.js Index: test/mjsunit/top-level-assignments.js =================================================================== --- test/mjsunit/top-level-assignments.js (revision 1449) +++ test/mjsunit/top-level-assignments.js (working copy) @@ -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); Index: src/objects.cc =================================================================== --- src/objects.cc (revision 1449) +++ src/objects.cc (working copy) @@ -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. --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
