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

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

Issue 2531973002: Simple BlinkGC heap compaction. (Closed)
Patch Set: tweak assert Created 4 years 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 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
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
191 static void enterGCForbiddenScope() { 205 static void enterGCForbiddenScope() {
192 ThreadState::current()->enterGCForbiddenScope(); 206 ThreadState::current()->enterGCForbiddenScope();
193 } 207 }
194 208
195 static void leaveGCForbiddenScope() { 209 static void leaveGCForbiddenScope() {
196 ThreadState::current()->leaveGCForbiddenScope(); 210 ThreadState::current()->leaveGCForbiddenScope();
197 } 211 }
198 212
199 private: 213 private:
200 static void backingFree(void*); 214 static void backingFree(void*);
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 const blink::HeapHashCountedSet<Value, HashFunctions, Traits>& set, 785 const blink::HeapHashCountedSet<Value, HashFunctions, Traits>& set,
772 VectorType& vector) { 786 VectorType& vector) {
773 copyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits, 787 copyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits,
774 blink::HeapAllocator>&>(set), 788 blink::HeapAllocator>&>(set),
775 vector); 789 vector);
776 } 790 }
777 791
778 } // namespace WTF 792 } // namespace WTF
779 793
780 #endif 794 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698