| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index 389789f7e85ca533c09a01500ddc204d90049986..e10b3e692565794b0e416ebb76be60334c0e3e5c 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -1752,6 +1752,9 @@ void Factory::ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> object,
|
| ASSERT(constructor->has_initial_map());
|
| Handle<Map> map(constructor->initial_map(), isolate());
|
|
|
| + // The proxy's hash should be retained across reinitialization.
|
| + Handle<Object> hash(object->hash(), isolate());
|
| +
|
| // Check that the already allocated object has the same size and type as
|
| // objects allocated using the constructor.
|
| ASSERT(map->instance_size() == object->map()->instance_size());
|
| @@ -1771,6 +1774,9 @@ void Factory::ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> object,
|
| Heap* heap = isolate()->heap();
|
| // Reinitialize the object from the constructor map.
|
| heap->InitializeJSObjectFromMap(*object, *properties, *map);
|
| +
|
| + // Restore the saved hash.
|
| + object->set_hash(*hash);
|
| }
|
|
|
|
|
|
|