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

Unified Diff: src/bootstrapper.cc

Issue 2741683004: [rename] Rename internal field to embedder field. (Closed)
Patch Set: DEPRECATE_SOON(GetInternalField) Created 3 years, 9 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
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index f76aa35bbea0674adbc27d5b3da24a21c7fae67d..60d39c40c507e7d2e2977c5465e53edcf3678fbf 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -147,7 +147,7 @@ class Genesis BASE_EMBEDDED {
Genesis(Isolate* isolate, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template,
size_t context_snapshot_index,
- v8::DeserializeInternalFieldsCallback internal_fields_deserializer,
+ v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer,
GlobalContextType context_type);
Genesis(Isolate* isolate, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template);
@@ -320,11 +320,11 @@ Handle<Context> Bootstrapper::CreateEnvironment(
MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template,
v8::ExtensionConfiguration* extensions, size_t context_snapshot_index,
- v8::DeserializeInternalFieldsCallback internal_fields_deserializer,
+ v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer,
GlobalContextType context_type) {
HandleScope scope(isolate_);
Genesis genesis(isolate_, maybe_global_proxy, global_proxy_template,
- context_snapshot_index, internal_fields_deserializer,
+ context_snapshot_index, embedder_fields_deserializer,
context_type);
Handle<Context> env = genesis.result();
if (env.is_null() || !InstallExtensions(env, extensions)) {
@@ -1026,7 +1026,7 @@ Handle<JSGlobalObject> Genesis::CreateNewGlobals(
Handle<Code> code = isolate()->builtins()->Illegal();
global_proxy_function =
factory()->NewFunction(name, code, JS_GLOBAL_PROXY_TYPE,
- JSGlobalProxy::SizeWithInternalFields(0));
+ JSGlobalProxy::SizeWithEmbedderFields(0));
} else {
Handle<ObjectTemplateInfo> data =
v8::Utils::OpenHandle(*global_proxy_template);
@@ -2649,7 +2649,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
factory->NewJSObject(isolate->object_function(), TENURED);
Handle<JSFunction> data_view_fun =
InstallFunction(global, "DataView", JS_DATA_VIEW_TYPE,
- JSDataView::kSizeWithInternalFields, prototype,
+ JSDataView::kSizeWithEmbedderFields, prototype,
Builtins::kDataViewConstructor);
InstallWithIntrinsicDefaultProto(isolate, data_view_fun,
Context::DATA_VIEW_FUN_INDEX);
@@ -3038,7 +3038,7 @@ void Genesis::InstallTypedArray(const char* name, ElementsKind elements_kind,
Handle<JSObject> prototype =
factory()->NewJSObject(isolate()->object_function(), TENURED);
Handle<JSFunction> result = InstallFunction(
- global, name, JS_TYPED_ARRAY_TYPE, JSTypedArray::kSizeWithInternalFields,
+ global, name, JS_TYPED_ARRAY_TYPE, JSTypedArray::kSizeWithEmbedderFields,
prototype, Builtins::kIllegal);
result->initial_map()->set_elements_kind(elements_kind);
@@ -3905,7 +3905,7 @@ Handle<JSFunction> Genesis::InstallArrayBuffer(Handle<JSObject> target,
// Allocate the constructor with the given {prototype}.
Handle<JSFunction> array_buffer_fun =
InstallFunction(target, name, JS_ARRAY_BUFFER_TYPE,
- JSArrayBuffer::kSizeWithInternalFields, prototype,
+ JSArrayBuffer::kSizeWithEmbedderFields, prototype,
Builtins::kArrayBufferConstructor);
array_buffer_fun->shared()->SetConstructStub(
*isolate()->builtins()->ArrayBufferConstructor_ConstructStub());
@@ -4881,7 +4881,7 @@ Genesis::Genesis(
Isolate* isolate, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template,
size_t context_snapshot_index,
- v8::DeserializeInternalFieldsCallback internal_fields_deserializer,
+ v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer,
GlobalContextType context_type)
: isolate_(isolate), active_(isolate->bootstrapper()) {
NoTrackDoubleFieldsForSerializerScope disable_scope(isolate);
@@ -4915,10 +4915,10 @@ Genesis::Genesis(
static_cast<int>(context_snapshot_index) - 1);
instance_size = Smi::cast(size)->value();
} else {
- instance_size = JSGlobalProxy::SizeWithInternalFields(
+ instance_size = JSGlobalProxy::SizeWithEmbedderFields(
global_proxy_template.IsEmpty()
? 0
- : global_proxy_template->InternalFieldCount());
+ : global_proxy_template->EmbedderFieldCount());
}
global_proxy =
isolate->factory()->NewUninitializedJSGlobalProxy(instance_size);
@@ -4930,7 +4930,7 @@ Genesis::Genesis(
if (!isolate->initialized_from_snapshot() ||
!Snapshot::NewContextFromSnapshot(isolate, global_proxy,
context_snapshot_index,
- internal_fields_deserializer)
+ embedder_fields_deserializer)
.ToHandle(&native_context_)) {
native_context_ = Handle<Context>();
}
@@ -5044,8 +5044,8 @@ Genesis::Genesis(Isolate* isolate,
return;
}
- const int proxy_size = JSGlobalProxy::SizeWithInternalFields(
- global_proxy_template->InternalFieldCount());
+ const int proxy_size = JSGlobalProxy::SizeWithEmbedderFields(
+ global_proxy_template->EmbedderFieldCount());
Handle<JSGlobalProxy> global_proxy;
if (!maybe_global_proxy.ToHandle(&global_proxy)) {
@@ -5073,8 +5073,8 @@ 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(),
- global_proxy_template->InternalFieldCount());
+ DCHECK_EQ(global_proxy_data->embedder_field_count(),
+ global_proxy_template->EmbedderFieldCount());
Handle<Map> global_proxy_map = isolate->factory()->NewMap(
JS_GLOBAL_PROXY_TYPE, proxy_size, FAST_HOLEY_SMI_ELEMENTS);
JSFunction::SetInitialMap(global_proxy_function, global_proxy_map,

Powered by Google App Engine
This is Rietveld 408576698