Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: src/bootstrapper.cc

Issue 14200035: Rollback of r13728 in 3.17 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.17
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index b2c8c778c0d04c479d39f52ece2564a34bbbace8..6487dc991d915787f9a57a27e014117a3f0e04e2 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -485,26 +485,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 | DONT_DELETE);
- object_prototype_map->set_instance_descriptors(*prototype_descriptors);
-
- { // Add __proto__.
- CallbacksDescriptor d(heap->Proto_symbol(), *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);
}
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698