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

Unified Diff: third_party/WebKit/Source/platform/exported/Platform.cpp

Issue 1977783002: BlinkGCMemoryDumpProvider should inherit from MemoryDumpProvider directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/exported/Platform.cpp
diff --git a/third_party/WebKit/Source/platform/exported/Platform.cpp b/third_party/WebKit/Source/platform/exported/Platform.cpp
index 77b9c7df88c12b3b47e194929ce524be9a2b08aa..96da43fbe7c39a305608a646ca34d5abd23e817d 100644
--- a/third_party/WebKit/Source/platform/exported/Platform.cpp
+++ b/third_party/WebKit/Source/platform/exported/Platform.cpp
@@ -34,6 +34,7 @@
#include "platform/PartitionAllocMemoryDumpProvider.h"
#include "platform/fonts/FontCacheMemoryDumpProvider.h"
#include "platform/graphics/CompositorFactory.h"
+#include "platform/heap/BlinkGCMemoryDumpProvider.h"
#include "platform/heap/GCTaskRunner.h"
#include "platform/web_memory_dump_provider_adapter.h"
#include "public/platform/Platform.h"
@@ -92,6 +93,8 @@ void Platform::initialize(Platform* platform)
WTF::initialize(callOnMainThreadFunction);
ProcessHeap::init();
+ if (base::ThreadTaskRunnerHandle::IsSet())
+ base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(BlinkGCMemoryDumpProvider::instance(), "BlinkGC", base::ThreadTaskRunnerHandle::Get());
ThreadState::attachMainThread();
@@ -114,6 +117,8 @@ void Platform::shutdown()
if (s_platform->m_mainThread) {
s_platform->unregisterMemoryDumpProvider(FontCacheMemoryDumpProvider::instance());
base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(PartitionAllocMemoryDumpProvider::instance());
+ base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(BlinkGCMemoryDumpProvider::instance());
+
ASSERT(s_gcTaskRunner);
delete s_gcTaskRunner;
s_gcTaskRunner = nullptr;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698