// Allocate map.
// TODO(rossberg): Once we optimize proxies, think about a scheme to share
// maps. Will probably depend on the identity of the handler object, too.
- Object* map_obj;
+ Map* map;
MaybeObject* maybe_map_obj = AllocateMap(JS_PROXY_TYPE, JSProxy::kSize);
- if (!maybe_map_obj->ToObject(&map_obj)) return maybe_map_obj;
- Map* map = Map::cast(map_obj);
+ if (!maybe_map_obj->To<Map>(&map)) return maybe_map_obj;
map->set_prototype(prototype);
map->set_pre_allocated_property_fields(1);
map->set_inobject_properties(1);
return kVisitSharedFunctionInfo;
case JS_PROXY_TYPE:
- return GetVisitorIdForSize(kVisitDataObject,
- kVisitDataObjectGeneric,
+ return GetVisitorIdForSize(kVisitStruct,
+ kVisitStructGeneric,
JSProxy::kSize);
case FOREIGN_TYPE: