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

Unified Diff: third_party/WebKit/Source/core/Init.cpp

Issue 1773273004: Move code to register/unregister memory dump provider from blink::initialize/shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/core/Init.cpp
diff --git a/third_party/WebKit/Source/core/Init.cpp b/third_party/WebKit/Source/core/Init.cpp
index 056121830cd5b026244838e0f599b8fa1fc855b9..61e6ee6d860a04d8332851dd9d60196f276ec912 100644
--- a/third_party/WebKit/Source/core/Init.cpp
+++ b/third_party/WebKit/Source/core/Init.cpp
@@ -49,6 +49,7 @@
#include "core/dom/StyleChangeReason.h"
#include "core/events/EventFactory.h"
#include "core/fetch/FetchInitiatorTypeNames.h"
+#include "core/fetch/WebCacheMemoryDumpProvider.h"
#include "core/html/canvas/CanvasRenderingContextFactory.h"
#include "core/html/parser/HTMLParserThread.h"
#include "core/workers/WorkerThread.h"
@@ -137,6 +138,8 @@ void CoreInitializer::init()
StringImpl::freezeStaticStrings();
+ Platform::current()->registerMemoryDumpProvider(WebCacheMemoryDumpProvider::instance(), "MemoryCache");
+
// Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but
// does not start the threads.
HTMLParserThread::init();
@@ -150,6 +153,8 @@ void CoreInitializer::shutdown()
ASSERT(Platform::current());
HTMLParserThread::shutdown();
+ Platform::current()->unregisterMemoryDumpProvider(WebCacheMemoryDumpProvider::instance());
+
WorkerThread::terminateAndWaitForAllWorkers();
}

Powered by Google App Engine
This is Rietveld 408576698