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

Unified Diff: src/bootstrapper.cc

Issue 2467463002: Optionally create internal fields on global proxy objects (Closed)
Patch Set: updates 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 | « src/api-natives.cc ('k') | 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 61d08acb5f38f07ea0081d22e8281810b3f898ae..930beff545c9840661ecc79271fd9284a1ad038c 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -960,8 +960,9 @@ Handle<JSGlobalObject> Genesis::CreateNewGlobals(
if (global_proxy_template.IsEmpty()) {
Handle<String> name = Handle<String>(heap()->empty_string());
Handle<Code> code = isolate()->builtins()->Illegal();
- global_proxy_function = factory()->NewFunction(
- name, code, JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSize);
+ global_proxy_function =
+ factory()->NewFunction(name, code, JS_GLOBAL_PROXY_TYPE,
+ JSGlobalProxy::kSizeWithInternalFields);
} else {
Handle<ObjectTemplateInfo> data =
v8::Utils::OpenHandle(*global_proxy_template);
@@ -4519,9 +4520,11 @@ Genesis::Genesis(Isolate* isolate,
Handle<JSFunction> global_proxy_function =
isolate->factory()->NewFunctionFromSharedFunctionInfo(
initial_map, shared, factory()->undefined_value());
- DCHECK_EQ(global_proxy_data->internal_field_count(), 0);
+ DCHECK_EQ(global_proxy_data->internal_field_count(),
+ v8::Context::kProxyInternalFieldCount);
Handle<Map> global_proxy_map = isolate->factory()->NewMap(
- JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSize, FAST_HOLEY_SMI_ELEMENTS);
+ JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSizeWithInternalFields,
+ FAST_HOLEY_SMI_ELEMENTS);
JSFunction::SetInitialMap(global_proxy_function, global_proxy_map,
factory()->null_value());
global_proxy_map->set_is_access_check_needed(true);
« no previous file with comments | « src/api-natives.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698