Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h b/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h |
| index 660f519ec316dd4b30305c503dfd0c28af7381d2..eb68310da5a219c165d454c83a5f1c66ab9e6686 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h |
| +++ b/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h |
| @@ -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. |
|
haraken
2016/12/12 01:02:07
To guarantee this fact, you need to guarantee that
Michael Lippautz
2016/12/12 08:18:57
We (still) cannot handle this case :) We cannot ma
|
| + // - 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. |
|
haraken
2016/12/12 08:44:13
Can we add a dcheck to check if m_parent is a whit
Michael Lippautz
2016/12/12 11:42:27
Unfortunately not, as we use this type also as a w
|
| } |
| TraceWrapperMember(WTF::HashTableDeletedValueType x) |
| : Member<T>(x), m_parent(nullptr) {} |