OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef Member_h | 5 #ifndef Member_h |
6 #define Member_h | 6 #define Member_h |
7 | 7 |
8 #include "wtf/Allocator.h" | 8 #include "wtf/Allocator.h" |
9 #include "wtf/HashFunctions.h" | 9 #include "wtf/HashFunctions.h" |
10 #include "wtf/HashTraits.h" | 10 #include "wtf/HashTraits.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // is a traceable object. In other words, the pointer is either of: | 149 // is a traceable object. In other words, the pointer is either of: |
150 // | 150 // |
151 // (a) a pointer to the head of an on-heap object. | 151 // (a) a pointer to the head of an on-heap object. |
152 // (b) a pointer to the head of an on-heap mixin object. | 152 // (b) a pointer to the head of an on-heap mixin object. |
153 // | 153 // |
154 // We can check it by calling ThreadHeap::isHeapObjectAlive(m_raw), | 154 // We can check it by calling ThreadHeap::isHeapObjectAlive(m_raw), |
155 // but we cannot call it here because it requires to include T.h. | 155 // but we cannot call it here because it requires to include T.h. |
156 // So we currently only try to implement the check for (a), but do | 156 // So we currently only try to implement the check for (a), but do |
157 // not insist that T's definition is in scope. | 157 // not insist that T's definition is in scope. |
158 if (IsFullyDefined<T>::value && !IsGarbageCollectedMixin<T>::value) | 158 if (IsFullyDefined<T>::value && !IsGarbageCollectedMixin<T>::value) |
159 HeapObjectHeader::fromPayload(m_raw)->checkHeader(); | 159 HeapObjectHeader::checkFromPayload(m_raw); |
160 #endif | 160 #endif |
161 #endif | 161 #endif |
162 } | 162 } |
163 | 163 |
164 void saveCreationThreadState() { | 164 void saveCreationThreadState() { |
165 #if DCHECK_IS_ON() | 165 #if DCHECK_IS_ON() |
166 if (tracenessConfiguration == TracenessMemberConfiguration::Untraced) { | 166 if (tracenessConfiguration == TracenessMemberConfiguration::Untraced) { |
167 m_creationThreadState = nullptr; | 167 m_creationThreadState = nullptr; |
168 } else { | 168 } else { |
169 m_creationThreadState = ThreadState::current(); | 169 m_creationThreadState = ThreadState::current(); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 | 540 |
541 template <typename T> | 541 template <typename T> |
542 struct IsTraceable<blink::TraceWrapperMember<T>> { | 542 struct IsTraceable<blink::TraceWrapperMember<T>> { |
543 STATIC_ONLY(IsTraceable); | 543 STATIC_ONLY(IsTraceable); |
544 static const bool value = true; | 544 static const bool value = true; |
545 }; | 545 }; |
546 | 546 |
547 } // namespace WTF | 547 } // namespace WTF |
548 | 548 |
549 #endif // Member_h | 549 #endif // Member_h |
OLD | NEW |