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

Side by Side Diff: Source/platform/heap/HeapAllocator.h

Issue 1166623002: Oilpan: Remove a visitor parameter from isHeapObjectAlive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/TraceTraits.h" 9 #include "platform/heap/TraceTraits.h"
10 #include "wtf/Assertions.h" 10 #include "wtf/Assertions.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 static void deleteArray(void* ptr) 112 static void deleteArray(void* ptr)
113 { 113 {
114 ASSERT_NOT_REACHED(); 114 ASSERT_NOT_REACHED();
115 } 115 }
116 116
117 static bool isAllocationAllowed() 117 static bool isAllocationAllowed()
118 { 118 {
119 return ThreadState::current()->isAllocationAllowed(); 119 return ThreadState::current()->isAllocationAllowed();
120 } 120 }
121 121
122 template<typename T>
123 static bool isHeapObjectAlive(T* object)
124 {
125 return Heap::isHeapObjectAlive(object);
126 }
127
122 template<typename VisitorDispatcher> 128 template<typename VisitorDispatcher>
123 static void markNoTracing(VisitorDispatcher visitor, const void* t) { visito r->markNoTracing(t); } 129 static void markNoTracing(VisitorDispatcher visitor, const void* t) { visito r->markNoTracing(t); }
124 130
125 template<typename VisitorDispatcher, typename T, typename Traits> 131 template<typename VisitorDispatcher, typename T, typename Traits>
126 static void trace(VisitorDispatcher visitor, T& t) 132 static void trace(VisitorDispatcher visitor, T& t)
127 { 133 {
128 TraceCollectionIfEnabled<WTF::ShouldBeTraced<Traits>::value, Traits::wea kHandlingFlag, WTF::WeakPointersActWeak, T, Traits>::trace(visitor, t); 134 TraceCollectionIfEnabled<WTF::ShouldBeTraced<Traits>::value, Traits::wea kHandlingFlag, WTF::WeakPointersActWeak, T, Traits>::trace(visitor, t);
129 } 135 }
130 136
131 template<typename VisitorDispatcher> 137 template<typename VisitorDispatcher>
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 template<typename T, size_t i, typename U> 457 template<typename T, size_t i, typename U>
452 inline void swap(HeapListHashSet<T, i, U>& a, HeapListHashSet<T, i, U>& b) { a.s wap(b); } 458 inline void swap(HeapListHashSet<T, i, U>& a, HeapListHashSet<T, i, U>& b) { a.s wap(b); }
453 template<typename T, typename U, typename V> 459 template<typename T, typename U, typename V>
454 inline void swap(HeapLinkedHashSet<T, U, V>& a, HeapLinkedHashSet<T, U, V>& b) { a.swap(b); } 460 inline void swap(HeapLinkedHashSet<T, U, V>& a, HeapLinkedHashSet<T, U, V>& b) { a.swap(b); }
455 template<typename T, typename U, typename V> 461 template<typename T, typename U, typename V>
456 inline void swap(HeapHashCountedSet<T, U, V>& a, HeapHashCountedSet<T, U, V>& b) { a.swap(b); } 462 inline void swap(HeapHashCountedSet<T, U, V>& a, HeapHashCountedSet<T, U, V>& b) { a.swap(b); }
457 463
458 } // namespace blink 464 } // namespace blink
459 465
460 #endif 466 #endif
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698