| 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..19bec4cb05062704b241c4e238b90d203d820418 100644
|
| --- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
|
| @@ -81,21 +81,17 @@ bool BlinkGCMemoryDumpProvider::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfD
|
| return true;
|
| }
|
|
|
| -void BlinkGCMemoryDumpProvider::onHeapProfilingEnabled(bool enabled)
|
| +void BlinkGCMemoryDumpProvider::onHeapProfilingEnabled()
|
| {
|
| - if (enabled) {
|
| - {
|
| - MutexLocker locker(m_allocationRegisterMutex);
|
| - if (!m_allocationRegister)
|
| - m_allocationRegister = adoptPtr(new base::trace_event::AllocationRegister());
|
| - }
|
| - HeapAllocHooks::setAllocationHook(reportAllocation);
|
| - HeapAllocHooks::setFreeHook(reportFree);
|
| - } else {
|
| - HeapAllocHooks::setAllocationHook(nullptr);
|
| - HeapAllocHooks::setFreeHook(nullptr);
|
| + ASSERT(!m_isHeapProfilingEnabled);
|
| + {
|
| + MutexLocker locker(m_allocationRegisterMutex);
|
| + if (!m_allocationRegister)
|
| + m_allocationRegister = adoptPtr(new base::trace_event::AllocationRegister());
|
| }
|
| - m_isHeapProfilingEnabled = enabled;
|
| + HeapAllocHooks::setAllocationHook(reportAllocation);
|
| + HeapAllocHooks::setFreeHook(reportFree);
|
| + m_isHeapProfilingEnabled = true;
|
| }
|
|
|
| WebMemoryAllocatorDump* BlinkGCMemoryDumpProvider::createMemoryAllocatorDumpForCurrentGC(const String& absoluteName)
|
|
|