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

Unified Diff: src/factory.cc

Issue 853493003: Correctly reference global proxy in the partial snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove bogus check Created 5 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/factory.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 0a33839086f40c79806375f7125161fde28a7b2f..28526743341efef867af9977bc3f26b10e297897 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1958,6 +1958,18 @@ void Factory::ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type,
}
+Handle<JSGlobalProxy> Factory::NewUninitializedJSGlobalProxy() {
+ // Create an empty shell of a JSGlobalProxy that needs to be reinitialized
+ // via ReinitializeJSGlobalProxy later.
+ Handle<Map> map = NewMap(JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSize);
+ // Maintain invariant expected from any JSGlobalProxy.
+ map->set_is_access_check_needed(true);
+ CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateJSObjectFromMap(
+ *map, NOT_TENURED, false),
+ JSGlobalProxy);
+}
+
+
void Factory::ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> object,
Handle<JSFunction> constructor) {
DCHECK(constructor->has_initial_map());
« no previous file with comments | « src/factory.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698