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

Unified Diff: src/bootstrapper.cc

Issue 254433002: Store JSGlobalProxy's identity hash directly on the proxy itself (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged to trunk, removed Object.observe workaround Created 6 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.cc » ('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 b15871539534cfc2b7b363f5a2f1bd01de6fd5a4..4bb0f4d0475ea21f6fb4a9cb0b611811800e068b 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -769,16 +769,17 @@ Handle<JSGlobalProxy> Genesis::CreateNewGlobals(
// Set global_proxy.__proto__ to js_global after ConfigureGlobalObjects
// Return the global proxy.
+ Handle<JSGlobalProxy> global_proxy;
if (global_object.location() != NULL) {
ASSERT(global_object->IsJSGlobalProxy());
- Handle<JSGlobalProxy> global_proxy =
- Handle<JSGlobalProxy>::cast(global_object);
+ global_proxy = Handle<JSGlobalProxy>::cast(global_object);
factory()->ReinitializeJSGlobalProxy(global_proxy, global_proxy_function);
- return global_proxy;
} else {
- return Handle<JSGlobalProxy>::cast(
+ global_proxy = Handle<JSGlobalProxy>::cast(
factory()->NewJSObject(global_proxy_function, TENURED));
+ global_proxy->set_hash(heap()->undefined_value());
}
+ return global_proxy;
}
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698