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

Unified Diff: src/bootstrapper.cc

Issue 151019: Changed the global object representation (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
Index: src/bootstrapper.cc
===================================================================
--- src/bootstrapper.cc (revision 2285)
+++ src/bootstrapper.cc (working copy)
@@ -580,8 +580,7 @@
js_global_function->initial_map()->set_is_hidden_prototype();
SetExpectedNofProperties(js_global_function, 100);
- object = Handle<JSGlobalObject>::cast(
- Factory::NewJSObject(js_global_function, TENURED));
+ object = Factory::NewJSGlobalObject(js_global_function);
}
// Set the global context for the global object.
@@ -1445,6 +1444,9 @@
// Set the property.
Handle<String> key = Handle<String>(String::cast(raw_key));
Handle<Object> value = Handle<Object>(properties->ValueAt(i));
+ if (value->IsJSGlobalPropertyCell()) {
+ value = Handle<Object>(JSGlobalPropertyCell::cast(*value)->value());
+ }
PropertyDetails details = properties->DetailsAt(i);
SetProperty(to, key, value, details.attributes());
}
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/disassembler.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698