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

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

Issue 2819123002: Replace ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/heap (Closed)
Patch Set: fix build error 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // provide a version that asserts and fails at run-time if 134 // provide a version that asserts and fails at run-time if
135 // used. 135 // used.
136 // Elsewhere we expect compilation to fail if 'delete' is 136 // Elsewhere we expect compilation to fail if 'delete' is
137 // attempted used and instantiated with a HeapAllocator-based 137 // attempted used and instantiated with a HeapAllocator-based
138 // object, as HeapAllocator::free is not provided. 138 // object, as HeapAllocator::free is not provided.
139 static void Free(void*) { NOTREACHED(); } 139 static void Free(void*) { NOTREACHED(); }
140 #endif 140 #endif
141 141
142 template <typename T> 142 template <typename T>
143 static void* NewArray(size_t bytes) { 143 static void* NewArray(size_t bytes) {
144 ASSERT_NOT_REACHED(); 144 NOTREACHED();
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) { NOTREACHED(); }
149 149
150 static bool IsAllocationAllowed() { 150 static bool IsAllocationAllowed() {
151 return ThreadState::Current()->IsAllocationAllowed() && 151 return ThreadState::Current()->IsAllocationAllowed() &&
152 !ThreadState::Current()->IsObjectResurrectionForbidden(); 152 !ThreadState::Current()->IsObjectResurrectionForbidden();
153 } 153 }
154 154
155 static bool IsObjectResurrectionForbidden() { 155 static bool IsObjectResurrectionForbidden() {
156 return ThreadState::Current()->IsObjectResurrectionForbidden(); 156 return ThreadState::Current()->IsObjectResurrectionForbidden();
157 } 157 }
158 158
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 const blink::HeapHashCountedSet<Value, HashFunctions, Traits>& set, 847 const blink::HeapHashCountedSet<Value, HashFunctions, Traits>& set,
848 VectorType& vector) { 848 VectorType& vector) {
849 CopyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits, 849 CopyToVector(static_cast<const HashCountedSet<Value, HashFunctions, Traits,
850 blink::HeapAllocator>&>(set), 850 blink::HeapAllocator>&>(set),
851 vector); 851 vector);
852 } 852 }
853 853
854 } // namespace WTF 854 } // namespace WTF
855 855
856 #endif 856 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698