Commit 8ad31354 authored by verwaest's avatar verwaest Committed by Commit bot

Always mark entire prototype descriptor arrays.

BUG=chromium:506952
LOG=n

Review URL: https://codereview.chromium.org/1226783002

Cr-Commit-Position: refs/heads/master@{#29482}
parent f7b0ee34
......@@ -543,10 +543,12 @@ void StaticMarkingVisitor<StaticVisitor>::MarkMapContents(Heap* heap,
}
// Since descriptor arrays are potentially shared, ensure that only the
// descriptors that belong to this map are marked. The first time a
// non-empty descriptor array is marked, its header is also visited. The slot
// holding the descriptor array will be implicitly recorded when the pointer
// fields of this map are visited.
// descriptors that belong to this map are marked. The first time a non-empty
// descriptor array is marked, its header is also visited. The slot holding
// the descriptor array will be implicitly recorded when the pointer fields of
// this map are visited. Prototype maps don't keep track of transitions, so
// just mark the entire descriptor array.
if (!map->is_prototype_map()) {
DescriptorArray* descriptors = map->instance_descriptors();
if (StaticVisitor::MarkObjectWithoutPush(heap, descriptors) &&
descriptors->length() > 0) {
......@@ -560,6 +562,7 @@ void StaticMarkingVisitor<StaticVisitor>::MarkMapContents(Heap* heap,
descriptors->GetDescriptorStartSlot(start),
descriptors->GetDescriptorEndSlot(end));
}
}
// Mark the pointer fields of the Map. Since the transitions array has
// been marked already, it is fine that one of these fields contains a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment