Commit 50798c76 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[oilpan] ListHashSetNode: Avoid marking in Trace method

Instead just forward to the Trace method of this visitor which will call
ListHashSetNode::Trace after marking the node.

Bug: chromium:802273
Change-Id: Ic13090edead2e26c94ce0f0157e3d3f6d1effcb3
Reviewed-on: https://chromium-review.googlesource.com/939823
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539786}
parent 49a2aeb9
......@@ -695,14 +695,7 @@ struct TraceInCollectionTrait<
if (!HashTableHelper<Node*, typename Table::ExtractorType,
typename Table::KeyTraitsType>::
IsEmptyOrDeletedBucket(array[i])) {
TraceListHashSetValue(visitor, array[i]->value_);
// Just mark the node without tracing because we already traced
// the contents, and there is no need to trace the next and
// prev fields since iterating over the hash table backing will
// find the whole chain.
// TODO(mlippautz): Remove cast.
reinterpret_cast<blink::MarkingVisitor*>(visitor)->MarkNoTracing(
array[i]);
visitor->Trace(array[i]);
}
}
return false;
......@@ -874,12 +867,7 @@ struct TraceInCollectionTrait<
static_assert(IsTraceableInCollectionTrait<Traits>::value ||
Traits::kWeakHandlingFlag == WTF::kWeakHandling,
"T should not be traced");
TraceListHashSetValue(visitor, node->value_);
// Just mark the node without tracing because we already traced the
// contents, and there is no need to trace the next and prev fields
// since iterating over the hash table backing will find the whole
// chain.
visitor->MarkNoTracing(node);
visitor->Trace(node);
return false;
}
};
......
......@@ -447,10 +447,6 @@ class ListHashSetNode : public ListHashSetNodeBase<ValueArg> {
allocator->Deallocate(this);
}
// This is not called in normal tracing, but it is called if we find a
// pointer to a node on the stack using conservative scanning. Since the
// original ListHashSet may no longer exist we make sure to mark the
// neighbours in the chain too.
template <typename VisitorDispatcher>
void Trace(VisitorDispatcher visitor) {
// The conservative stack scan can find nodes that have been removed
......
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