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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 template<typename U> | 596 template<typename U> |
597 static void store(const U& value, H& storage) { storage = value; } | 597 static void store(const U& value, H& storage) { storage = value; } |
598 | 598 |
599 static PeekOutType peek(const H& value) { return value; } | 599 static PeekOutType peek(const H& value) { return value; } |
600 }; | 600 }; |
601 | 601 |
602 template<typename T> struct HashTraits<blink::Persistent<T>> : HandleHashTraits<
T, blink::Persistent<T>> { }; | 602 template<typename T> struct HashTraits<blink::Persistent<T>> : HandleHashTraits<
T, blink::Persistent<T>> { }; |
603 | 603 |
604 template<typename T> struct HashTraits<blink::CrossThreadPersistent<T>> : Handle
HashTraits<T, blink::CrossThreadPersistent<T>> { }; | 604 template<typename T> struct HashTraits<blink::CrossThreadPersistent<T>> : Handle
HashTraits<T, blink::CrossThreadPersistent<T>> { }; |
605 | 605 |
| 606 template <typename Value, typename HashFunctions, typename Traits, typename Vect
orType> |
| 607 inline void copyToVector(const blink::HeapHashCountedSet<Value, HashFunctions, T
raits>& set, VectorType& vector) |
| 608 { |
| 609 copyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits,
blink::HeapAllocator>&>(set), vector); |
| 610 } |
| 611 |
606 } // namespace WTF | 612 } // namespace WTF |
607 | 613 |
608 #endif | 614 #endif |
OLD | NEW |