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

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

Issue 2815663002: Disable collection backing reallocation during pre finalizer (Closed)
Patch Set: fix Created 3 years, 8 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 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 ASSERT_NOT_REACHED(); 144 ASSERT_NOT_REACHED();
145 return 0; 145 return 0;
146 } 146 }
147 147
148 static void DeleteArray(void* ptr) { ASSERT_NOT_REACHED(); } 148 static void DeleteArray(void* ptr) { ASSERT_NOT_REACHED(); }
149 149
150 static bool IsAllocationAllowed() { 150 static bool IsAllocationAllowed() {
151 return ThreadState::Current()->IsAllocationAllowed(); 151 return ThreadState::Current()->IsAllocationAllowed();
152 } 152 }
153 153
154 static bool IsBackingReallocationAllowed() {
kouhei (in TOK) 2017/04/12 06:14:01 Can we make it clear that this is inside prefinali
haraken 2017/04/12 06:44:34 Maybe we can rename this to IsObjectRessurectionFo
keishi 2017/04/12 09:43:53 Done.
155 return ThreadState::Current()->IsBackingReallocationAllowed();
156 }
157
154 template <typename T> 158 template <typename T>
155 static bool IsHeapObjectAlive(T* object) { 159 static bool IsHeapObjectAlive(T* object) {
156 return ThreadHeap::IsHeapObjectAlive(object); 160 return ThreadHeap::IsHeapObjectAlive(object);
157 } 161 }
158 162
159 template <typename VisitorDispatcher> 163 template <typename VisitorDispatcher>
160 static void MarkNoTracing(VisitorDispatcher visitor, const void* t) { 164 static void MarkNoTracing(VisitorDispatcher visitor, const void* t) {
161 visitor->MarkNoTracing(t); 165 visitor->MarkNoTracing(t);
162 } 166 }
163 167
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 const blink::HeapHashCountedSet<Value, HashFunctions, Traits>& set, 846 const blink::HeapHashCountedSet<Value, HashFunctions, Traits>& set,
843 VectorType& vector) { 847 VectorType& vector) {
844 CopyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits, 848 CopyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits,
845 blink::HeapAllocator>&>(set), 849 blink::HeapAllocator>&>(set),
846 vector); 850 vector);
847 } 851 }
848 852
849 } // namespace WTF 853 } // namespace WTF
850 854
851 #endif 855 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698