| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 HeapTerminatedArray_h | 5 #ifndef HeapTerminatedArray_h |
| 6 #define HeapTerminatedArray_h | 6 #define HeapTerminatedArray_h |
| 7 | 7 |
| 8 #include "platform/heap/Heap.h" | 8 #include "platform/heap/Heap.h" |
| 9 #include "wtf/TerminatedArray.h" | 9 #include "wtf/TerminatedArray.h" |
| 10 #include "wtf/TerminatedArrayBuilder.h" | 10 #include "wtf/TerminatedArrayBuilder.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 template<typename T> | 14 template<typename T> |
| 15 class HeapTerminatedArray : public TerminatedArray<T> { | 15 class HeapTerminatedArray : public TerminatedArray<T> { |
| 16 DISALLOW_ALLOCATION(); | 16 DISALLOW_NEW(); |
| 17 public: | 17 public: |
| 18 using TerminatedArray<T>::begin; | 18 using TerminatedArray<T>::begin; |
| 19 using TerminatedArray<T>::end; | 19 using TerminatedArray<T>::end; |
| 20 | 20 |
| 21 DEFINE_INLINE_TRACE() | 21 DEFINE_INLINE_TRACE() |
| 22 { | 22 { |
| 23 for (typename TerminatedArray<T>::iterator it = begin(); it != end(); ++
it) | 23 for (typename TerminatedArray<T>::iterator it = begin(); it != end(); ++
it) |
| 24 visitor->trace(*it); | 24 visitor->trace(*it); |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 51 | 51 |
| 52 template<typename T> | 52 template<typename T> |
| 53 class TraceEagerlyTrait<HeapTerminatedArray<T>> { | 53 class TraceEagerlyTrait<HeapTerminatedArray<T>> { |
| 54 public: | 54 public: |
| 55 static const bool value = TraceEagerlyTrait<T>::value; | 55 static const bool value = TraceEagerlyTrait<T>::value; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace blink | 58 } // namespace blink |
| 59 | 59 |
| 60 #endif // HeapTerminatedArray_h | 60 #endif // HeapTerminatedArray_h |
| OLD | NEW |