Commit 8882ee9c authored by mlippautz's avatar mlippautz Committed by Commit bot

[wrapper-tracing] Remove unnecessary barrier

We don't require a write barrier here as TraceWrapperMember is used for the
following scenarios:
- Initial initialization: The write barrier will not fire as the parent is
   initially white.
- Wrapping when inserting into a container: The write barrier will fire upon
  establishing the move into the container.
- Assignment to a field: The regular assignment operator will fire the write
  barrier.

Note that support for black allocation would require a barrier here.

BUG=chromium:468240

Review-Url: https://codereview.chromium.org/2564153002
Cr-Commit-Position: refs/heads/master@{#437870}
parent 69c7ebea
......@@ -28,7 +28,15 @@ class TraceWrapperMember : public Member<T> {
#if DCHECK_IS_ON()
DCHECK(!m_parent || HeapObjectHeader::fromPayload(m_parent)->checkHeader());
#endif
ScriptWrappableVisitor::writeBarrier(m_parent, raw);
// We don't require a write barrier here as TraceWrapperMember is used for
// the following scenarios:
// - Initial initialization: The write barrier will not fire as the parent
// is initially white.
// - Wrapping when inserting into a container: The write barrier will fire
// upon establishing the move into the container.
// - Assignment to a field: The regular assignment operator will fire the
// write barrier.
// Note that support for black allocation would require a barrier here.
}
TraceWrapperMember(WTF::HashTableDeletedValueType x)
: Member<T>(x), m_parent(nullptr) {}
......
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