Commit 0521c124 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Use InitialPropertiesLength to reinitialize rather than local calculation.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/256973003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent da0ca2af
......@@ -1737,7 +1737,7 @@ void Factory::ReinitializeJSReceiver(Handle<JSReceiver> object,
map->set_prototype(object->map()->prototype());
// Allocate the backing storage for the properties.
int prop_size = map->unused_property_fields() - map->inobject_properties();
int prop_size = map->InitialPropertiesLength();
Handle<FixedArray> properties = NewFixedArray(prop_size, TENURED);
Heap* heap = isolate()->heap();
......@@ -1788,7 +1788,7 @@ void Factory::ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> object,
ASSERT(map->instance_type() == object->map()->instance_type());
// Allocate the backing storage for the properties.
int prop_size = map->unused_property_fields() - map->inobject_properties();
int prop_size = map->InitialPropertiesLength();
Handle<FixedArray> properties = NewFixedArray(prop_size, TENURED);
// In order to keep heap in consistent state there must be no allocations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment