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

Unified Diff: sky/engine/platform/heap/Heap.h

Issue 681963002: Remove heap/*.cpp files (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/platform/heap/Handle.cpp ('k') | sky/engine/platform/heap/Heap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/heap/Heap.h
diff --git a/sky/engine/platform/heap/Heap.h b/sky/engine/platform/heap/Heap.h
index 73526d61ee3f808b2f4b56676d3b167024b4d302..9baafd87fb0818d5b17973108c1e90db20f4a778 100644
--- a/sky/engine/platform/heap/Heap.h
+++ b/sky/engine/platform/heap/Heap.h
@@ -1527,12 +1527,8 @@ Address ThreadHeap<Header>::allocate(size_t size, const GCInfo* gcInfo)
template<typename T, typename HeapTraits>
Address Heap::allocate(size_t size)
{
- ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
- ASSERT(state->isAllocationAllowed());
- const GCInfo* gcInfo = GCInfoTrait<T>::get();
- int heapIndex = HeapTraits::index(gcInfo->hasFinalizer());
- BaseHeap* heap = state->heap(heapIndex);
- return static_cast<typename HeapTraits::HeapType*>(heap)->allocate(size, gcInfo);
+ ASSERT_NOT_REACHED();
+ return 0;
}
template<typename T>
@@ -1619,7 +1615,8 @@ public:
static bool isAllocationAllowed()
{
- return ThreadState::current()->isAllocationAllowed();
+ ASSERT_NOT_REACHED();
+ return false;
}
static void markUsingGCInfo(Visitor* visitor, const void* buffer)
« no previous file with comments | « sky/engine/platform/heap/Handle.cpp ('k') | sky/engine/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698