Index: third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp |
diff --git a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp |
index 6f924c190fddf649300923184ea073b1df57045a..abd9b811a168cfcc63542156b95198913b9414c0 100644 |
--- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp |
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp |
@@ -31,9 +31,9 @@ void dumpMemoryTotals(blink::WebProcessMemoryDump* memoryDump) |
objectsDump->addScalar("size", "bytes", Heap::allocatedObjectSize() + Heap::markedObjectSize()); |
} |
-void reportAllocation(Address address, size_t size) |
+void reportAllocation(Address address, size_t size, const char* typeName) |
{ |
- BlinkGCMemoryDumpProvider::instance()->insert(address, size); |
+ BlinkGCMemoryDumpProvider::instance()->insert(address, size, typeName); |
} |
void reportFree(Address address) |
@@ -114,11 +114,10 @@ BlinkGCMemoryDumpProvider::BlinkGCMemoryDumpProvider() |
{ |
} |
-void BlinkGCMemoryDumpProvider::insert(Address address, size_t size) |
+void BlinkGCMemoryDumpProvider::insert(Address address, size_t size, const char* typeName) |
{ |
base::trace_event::AllocationContext context = base::trace_event::AllocationContextTracker::GetContextSnapshot(); |
- // TODO(hajimehoshi): Implement to use a correct type name. |
- context.type_name = ""; |
+ context.type_name = typeName; |
MutexLocker locker(m_allocationRegisterMutex); |
if (m_allocationRegister) |
m_allocationRegister->Insert(address, size, context); |