Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index f57a1f6fd8fb69cbb3ac633382283fa7e6556486..596b480b70f8526956264cc2d10b5f6511f0a351 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -477,25 +477,10 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) { |
native_context()->set_object_function(*object_fun); |
// Allocate a new prototype for the object function. |
- Handle<Map> object_prototype_map = |
- factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
- Handle<DescriptorArray> prototype_descriptors( |
- factory->NewDescriptorArray(0, 1)); |
- DescriptorArray::WhitenessWitness witness(*prototype_descriptors); |
- |
- Handle<Foreign> object_prototype( |
- factory->NewForeign(&Accessors::ObjectPrototype)); |
- PropertyAttributes attribs = static_cast<PropertyAttributes>(DONT_ENUM); |
- object_prototype_map->set_instance_descriptors(*prototype_descriptors); |
- |
- { // Add __proto__. |
- CallbacksDescriptor d(heap->proto_string(), *object_prototype, attribs); |
- object_prototype_map->AppendDescriptor(&d, witness); |
- } |
- |
- Handle<JSObject> prototype = factory->NewJSObjectFromMap( |
- object_prototype_map, |
+ Handle<JSObject> prototype = factory->NewJSObject( |
+ isolate->object_function(), |
TENURED); |
+ |
native_context()->set_initial_object_prototype(*prototype); |
SetPrototype(object_fun, prototype); |
} |