Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index ac3fbb0c69b0979f478e8c6c1ecb7ef692c950c7..d335d07f715d62eda319820798322aecdc4e69c2 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -1669,6 +1669,8 @@ bool Genesis::InstallNatives() { |
builtins->set_native_context(*native_context()); |
builtins->set_global_context(*native_context()); |
builtins->set_global_receiver(*builtins); |
+ builtins->set_global_receiver(native_context()->global_proxy()); |
+ |
// Set up the 'global' properties of the builtins object. The |
// 'global' property that refers to the global object is the only |
@@ -1682,6 +1684,11 @@ bool Genesis::InstallNatives() { |
CHECK_NOT_EMPTY_HANDLE(isolate(), |
JSObject::SetLocalPropertyIgnoreAttributes( |
builtins, global_string, global_obj, attributes)); |
+ Handle<String> builtins_string = |
+ factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("builtins")); |
+ CHECK_NOT_EMPTY_HANDLE(isolate(), |
+ JSObject::SetLocalPropertyIgnoreAttributes( |
+ builtins, builtins_string, builtins, attributes)); |
// Set up the reference from the global object to the builtins object. |
JSGlobalObject::cast(native_context()->global_object())-> |
@@ -2602,6 +2609,9 @@ Genesis::Genesis(Isolate* isolate, |
if (!ConfigureGlobalObjects(global_template)) return; |
isolate->counters()->contexts_created_from_scratch()->Increment(); |
} |
+ native_context()->builtins()->set_global_receiver( |
+ native_context()->global_proxy()); |
Toon Verwaest
2013/12/18 13:09:33
I think we should only be doing this if we are des
|
+ |
// Initialize experimental globals and install experimental natives. |
InitializeExperimentalGlobal(); |