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

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: Re-introduce %UnwrapProxy to make Object.observe work 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') | src/object-observe.js » ('J')
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 6c6e6b361150707da995ca6d9fe7e52f122d198b..fd34906b8c7c8c2a6c22375155cdf5f21481bf17 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -758,16 +758,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') | src/object-observe.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698