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

Unified Diff: src/bootstrapper.cc

Issue 151146: Treat the builtins object like other global objects (with... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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 | « src/arm/stub-cache-arm.cc ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
===================================================================
--- src/bootstrapper.cc (revision 2317)
+++ src/bootstrapper.cc (working copy)
@@ -539,7 +539,7 @@
{ // --- G l o b a l ---
// Step 1: create a fresh inner JSGlobalObject
- Handle<JSGlobalObject> object;
+ Handle<GlobalObject> object;
{
Handle<JSFunction> js_global_function;
Handle<ObjectTemplateInfo> js_global_template;
@@ -579,8 +579,7 @@
}
js_global_function->initial_map()->set_is_hidden_prototype();
- SetExpectedNofProperties(js_global_function, 100);
- object = Factory::NewJSGlobalObject(js_global_function);
+ object = Factory::NewGlobalObject(js_global_function);
}
// Set the global context for the global object.
@@ -962,12 +961,10 @@
Handle<String> name = Factory::LookupAsciiSymbol("builtins");
builtins_fun->shared()->set_instance_class_name(*name);
- SetExpectedNofProperties(builtins_fun, 100);
// Allocate the builtins object.
Handle<JSBuiltinsObject> builtins =
- Handle<JSBuiltinsObject>::cast(Factory::NewJSObject(builtins_fun,
- TENURED));
+ Handle<JSBuiltinsObject>::cast(Factory::NewGlobalObject(builtins_fun));
builtins->set_builtins(*builtins);
builtins->set_global_context(*global_context());
builtins->set_global_receiver(*builtins);
@@ -1190,10 +1187,6 @@
apply->shared()->set_length(2);
}
- // Make sure that the builtins object has fast properties.
- // If the ASSERT below fails, please increase the expected number of
- // properties for the builtins object.
- ASSERT(builtins->HasFastProperties());
#ifdef DEBUG
builtins->Verify();
#endif
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698