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

Unified Diff: src/bootstrapper.cc

Issue 2474843003: Allow the global object to be frozen through the global template (Closed)
Patch Set: Format Created 4 years, 1 month 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/objects.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 e484c80203fe6e9b4817c3215cc18ee95a7887e3..17c499a558dda82555c709e99f6b4e914e258c01 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -948,6 +948,8 @@ Handle<JSGlobalObject> Genesis::CreateNewGlobals(
js_global_object_function = ApiNatives::CreateApiFunction(
isolate(), js_global_object_constructor, factory()->the_hole_value(),
ApiNatives::GlobalObjectType);
+ if (js_global_object_template->immutable_proto())
adamk 2016/11/04 17:39:19 I think you can do this check inside ApiNatives::C
Dan Ehrenberg 2016/11/04 17:56:36 Done
+ js_global_object_function->initial_map()->set_immutable_proto(true);
}
js_global_object_function->initial_map()->set_is_prototype_map(true);
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698