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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapAllocator.h

Issue 1721333002: Bug fix: Add BlinkGC allocation hooks to CSS, Node and vector/table backing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use COMMA Created 4 years, 10 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
Index: third_party/WebKit/Source/platform/heap/HeapAllocator.h
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.h b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
index d466aff9b56ed64cc7494ce1724bed9429340066..fcf1f2d0d36d550d1cd0fac8b5ea3b4820de6cef 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.h
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
@@ -62,7 +62,10 @@ public:
{
size_t gcInfoIndex = GCInfoTrait<HeapVectorBacking<T, VectorTraits<T>>>::index();
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
- return reinterpret_cast<T*>(Heap::allocateOnArenaIndex(state, size, BlinkGC::InlineVectorArenaIndex, gcInfoIndex));
+#define COMMA ,
+ const char* typeName = WTF_HEAP_PROFILER_TYPE_NAME(HeapVectorBacking<T COMMA VectorTraits<T>>);
+#undef COMMA
+ return reinterpret_cast<T*>(Heap::allocateOnArenaIndex(state, size, BlinkGC::InlineVectorArenaIndex, gcInfoIndex, typeName));
}
static void freeInlineVectorBacking(void*);
static bool expandInlineVectorBacking(void*, size_t);
@@ -73,7 +76,8 @@ public:
{
size_t gcInfoIndex = GCInfoTrait<HeapHashTableBacking<HashTable>>::index();
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
- return reinterpret_cast<T*>(Heap::allocateOnArenaIndex(state, size, BlinkGC::HashTableArenaIndex, gcInfoIndex));
+ const char* typeName = WTF_HEAP_PROFILER_TYPE_NAME(HeapHashTableBacking<HashTable>);
+ return reinterpret_cast<T*>(Heap::allocateOnArenaIndex(state, size, BlinkGC::HashTableArenaIndex, gcInfoIndex, typeName));
}
template <typename T, typename HashTable>
static T* allocateZeroedHashTableBacking(size_t size)
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698