OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 HeapAllocator_h | 5 #ifndef HeapAllocator_h |
6 #define HeapAllocator_h | 6 #define HeapAllocator_h |
7 | 7 |
8 #include "platform/heap/Heap.h" | 8 #include "platform/heap/Heap.h" |
9 #include "platform/heap/Persistent.h" | 9 #include "platform/heap/Persistent.h" |
10 #include "platform/heap/TraceTraits.h" | 10 #include "platform/heap/TraceTraits.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 181 } |
182 | 182 |
183 #if ENABLE(ASSERT) | 183 #if ENABLE(ASSERT) |
184 template <typename VisitorDispatcher> | 184 template <typename VisitorDispatcher> |
185 static bool weakTableRegistered(VisitorDispatcher visitor, | 185 static bool weakTableRegistered(VisitorDispatcher visitor, |
186 const void* closure) { | 186 const void* closure) { |
187 return visitor->weakTableRegistered(closure); | 187 return visitor->weakTableRegistered(closure); |
188 } | 188 } |
189 #endif | 189 #endif |
190 | 190 |
191 template <typename T, typename VisitorDispatcher> | |
192 static void registerBackingStoreReference(VisitorDispatcher visitor, | |
193 T** slot) { | |
194 visitor->registerBackingStoreReference(slot); | |
195 } | |
196 | |
197 template <typename T, typename VisitorDispatcher> | |
198 static void registerBackingStoreCallback(VisitorDispatcher visitor, | |
199 T* backingStore, | |
200 MovingObjectCallback callback, | |
201 void* callbackData) { | |
202 visitor->registerBackingStoreCallback(backingStore, callback, callbackData); | |
203 } | |
204 | |
205 static void enterGCForbiddenScope() { | 191 static void enterGCForbiddenScope() { |
206 ThreadState::current()->enterGCForbiddenScope(); | 192 ThreadState::current()->enterGCForbiddenScope(); |
207 } | 193 } |
208 | 194 |
209 static void leaveGCForbiddenScope() { | 195 static void leaveGCForbiddenScope() { |
210 ThreadState::current()->leaveGCForbiddenScope(); | 196 ThreadState::current()->leaveGCForbiddenScope(); |
211 } | 197 } |
212 | 198 |
213 private: | 199 private: |
214 static void backingFree(void*); | 200 static void backingFree(void*); |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 const blink::HeapHashCountedSet<Value, HashFunctions, Traits>& set, | 771 const blink::HeapHashCountedSet<Value, HashFunctions, Traits>& set, |
786 VectorType& vector) { | 772 VectorType& vector) { |
787 copyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits, | 773 copyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits, |
788 blink::HeapAllocator>&>(set), | 774 blink::HeapAllocator>&>(set), |
789 vector); | 775 vector); |
790 } | 776 } |
791 | 777 |
792 } // namespace WTF | 778 } // namespace WTF |
793 | 779 |
794 #endif | 780 #endif |
OLD | NEW |