Index: src/incremental-marking.cc |
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc |
index 7bbd5218b15fce6d55881088a491804b4f421747..2413b67803f090557280955d5196c590287f6007 100644 |
--- a/src/incremental-marking.cc |
+++ b/src/incremental-marking.cc |
@@ -830,6 +830,19 @@ void IncrementalMarking::Step(intptr_t allocated_bytes, |
MarkObjectGreyDoNotEnqueue(ctx->normalized_map_cache()); |
VisitGlobalContext(ctx, &marking_visitor); |
+ } else if (map->instance_type() == JS_FUNCTION_TYPE) { |
+ marking_visitor.VisitPointers( |
+ HeapObject::RawField(obj, JSFunction::kPropertiesOffset), |
+ HeapObject::RawField(obj, JSFunction::kCodeEntryOffset)); |
+ |
+ marking_visitor.VisitCodeEntry( |
+ obj->address() + JSFunction::kCodeEntryOffset); |
+ |
+ marking_visitor.VisitPointers( |
+ HeapObject::RawField(obj, |
+ JSFunction::kCodeEntryOffset + kPointerSize), |
+ HeapObject::RawField(obj, |
+ JSFunction::kNonWeakFieldsEndOffset)); |
} else { |
obj->IterateBody(map->instance_type(), size, &marking_visitor); |
} |