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

Unified Diff: src/bootstrapper.cc

Issue 104013008: Reland v8:18458 "Load the global proxy from the context of the target function." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/code-stubs.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 f27ca7ab8d687ac4f9de190edbdf6f247a7f7c21..7b8af06d1a40aaead50dd25d9a370260ff4c9394 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())->
@@ -2581,6 +2588,8 @@ Genesis::Genesis(Isolate* isolate,
HookUpGlobalProxy(inner_global, global_proxy);
HookUpInnerGlobal(inner_global);
+ native_context()->builtins()->set_global_receiver(
+ native_context()->global_proxy());
if (!ConfigureGlobalObjects(global_template)) return;
} else {
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698