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

Unified Diff: src/heap/heap.cc

Issue 2741683004: [rename] Rename internal field to embedder field. (Closed)
Patch Set: [rename] Rename internal field to embedder field. 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
« no previous file with comments | « src/global-handles.cc ('k') | src/i18n.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index ebff9f58502924cc571bd29659474ae6245f26f5..6447072ebe5acdcb61f83d7cbc60d82f677186ef 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3509,7 +3509,7 @@ void Heap::InitializeJSObjectBody(JSObject* obj, Map* map, int start_offset) {
DCHECK_LT(start_offset, map->instance_size());
// We cannot always fill with one_pointer_filler_map because objects
- // created from API functions expect their internal fields to be initialized
+ // created from API functions expect their embedder fields to be initialized
// with undefined_value.
// Pre-allocated fields need to be initialized with undefined_value as well
// so that object accesses before the constructor completes (e.g. in the
@@ -5628,14 +5628,14 @@ void Heap::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) {
void Heap::TracePossibleWrapper(JSObject* js_object) {
DCHECK(js_object->WasConstructedFromApiFunction());
- if (js_object->GetInternalFieldCount() >= 2 &&
- js_object->GetInternalField(0) &&
- js_object->GetInternalField(0) != undefined_value() &&
- js_object->GetInternalField(1) != undefined_value()) {
- DCHECK(reinterpret_cast<intptr_t>(js_object->GetInternalField(0)) % 2 == 0);
+ if (js_object->GetEmbedderFieldCount() >= 2 &&
+ js_object->GetEmbedderField(0) &&
+ js_object->GetEmbedderField(0) != undefined_value() &&
+ js_object->GetEmbedderField(1) != undefined_value()) {
+ DCHECK(reinterpret_cast<intptr_t>(js_object->GetEmbedderField(0)) % 2 == 0);
local_embedder_heap_tracer()->AddWrapperToTrace(std::pair<void*, void*>(
- reinterpret_cast<void*>(js_object->GetInternalField(0)),
- reinterpret_cast<void*>(js_object->GetInternalField(1))));
+ reinterpret_cast<void*>(js_object->GetEmbedderField(0)),
+ reinterpret_cast<void*>(js_object->GetEmbedderField(1))));
}
}
« no previous file with comments | « src/global-handles.cc ('k') | src/i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698