Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapTerminatedArray.h

Issue 1999343002: Unify and provide one IsGarbageCollectedType<T> implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_NEW(); 16 DISALLOW_NEW();
17 IS_GARBAGE_COLLECTED_TYPE();
17 public: 18 public:
18 using TerminatedArray<T>::begin; 19 using TerminatedArray<T>::begin;
19 using TerminatedArray<T>::end; 20 using TerminatedArray<T>::end;
20 21
21 DEFINE_INLINE_TRACE() 22 DEFINE_INLINE_TRACE()
22 { 23 {
23 for (typename TerminatedArray<T>::iterator it = begin(); it != end(); ++ it) 24 for (typename TerminatedArray<T>::iterator it = begin(); it != end(); ++ it)
24 visitor->trace(*it); 25 visitor->trace(*it);
25 } 26 }
26 27
(...skipping 30 matching lines...) Expand all
57 58
58 template<typename T> 59 template<typename T>
59 class TraceEagerlyTrait<HeapTerminatedArray<T>> { 60 class TraceEagerlyTrait<HeapTerminatedArray<T>> {
60 public: 61 public:
61 static const bool value = TraceEagerlyTrait<T>::value; 62 static const bool value = TraceEagerlyTrait<T>::value;
62 }; 63 };
63 64
64 } // namespace blink 65 } // namespace blink
65 66
66 #endif // HeapTerminatedArray_h 67 #endif // HeapTerminatedArray_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapAllocator.h ('k') | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698