| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 125a76716c034b8b61e74f2d62920fcf6b6615a0..16201a861411acd2bf99afa7c1a0c4c294dc1304 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -7401,6 +7401,25 @@ Handle<Map> Map::CopyForPreventExtensions(Handle<Map> map,
|
| }
|
|
|
|
|
| +Handle<Map> Map::FixProxy(Handle<Map> map, InstanceType type, int size) {
|
| + DCHECK(type == JS_OBJECT_TYPE || type == JS_FUNCTION_TYPE);
|
| + DCHECK(map->IsJSProxyMap());
|
| +
|
| + Isolate* isolate = map->GetIsolate();
|
| +
|
| + // Allocate fresh map.
|
| + // TODO(rossberg): Once we optimize proxies, cache these maps.
|
| + Handle<Map> new_map = isolate->factory()->NewMap(type, size);
|
| +
|
| + Handle<Object> prototype(map->prototype(), isolate);
|
| + Map::SetPrototype(new_map, prototype);
|
| +
|
| + map->NotifyLeafMapLayoutChange();
|
| +
|
| + return new_map;
|
| +}
|
| +
|
| +
|
| bool DescriptorArray::CanHoldValue(int descriptor, Object* value) {
|
| PropertyDetails details = GetDetails(descriptor);
|
| switch (details.type()) {
|
|
|