Commit b5223ab7 authored by rossberg@chromium.org's avatar rossberg@chromium.org

Fix object visitor.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5765e8a9
......@@ -3228,10 +3228,9 @@ MaybeObject* Heap::AllocateJSProxy(Object* handler, Object* prototype) {
// 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);
......
......@@ -89,8 +89,8 @@ StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId(
return kVisitSharedFunctionInfo;
case JS_PROXY_TYPE:
return GetVisitorIdForSize(kVisitDataObject,
kVisitDataObjectGeneric,
return GetVisitorIdForSize(kVisitStruct,
kVisitStructGeneric,
JSProxy::kSize);
case FOREIGN_TYPE:
......
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