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

Unified Diff: third_party/WebKit/Source/web/WebKit.cpp

Issue 1369253002: Add Web Resources usage to chrome://tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache2_base
Patch Set: Fix names. Created 5 years, 2 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 | « third_party/WebKit/Source/platform/SharedBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebKit.cpp
diff --git a/third_party/WebKit/Source/web/WebKit.cpp b/third_party/WebKit/Source/web/WebKit.cpp
index adfed56ac2462177c5be09a62e0eff7c47e51462..f3e3a7e26913744a099078853830e3cc0587106e 100644
--- a/third_party/WebKit/Source/web/WebKit.cpp
+++ b/third_party/WebKit/Source/web/WebKit.cpp
@@ -38,6 +38,7 @@
#include "core/Init.h"
#include "core/animation/AnimationClock.h"
#include "core/dom/Microtask.h"
+#include "core/fetch/WebCacheMemoryDumpProvider.h"
#include "core/frame/Settings.h"
#include "core/page/Page.h"
#include "core/workers/WorkerGlobalScopeProxy.h"
@@ -121,6 +122,9 @@ void initialize(Platform* platform)
ASSERT(!s_endOfTaskRunner);
s_endOfTaskRunner = new EndOfTaskRunner;
currentThread->addTaskObserver(s_endOfTaskRunner);
+
+ // Register web cache dump provider for tracing.
+ platform->registerMemoryDumpProvider(WebCacheMemoryDumpProvider::instance());
}
}
@@ -198,15 +202,14 @@ void shutdown()
{
// currentThread() is null if we are running on a thread without a message loop.
if (Platform::current()->currentThread()) {
+ Platform::current()->unregisterMemoryDumpProvider(WebCacheMemoryDumpProvider::instance());
+
// We don't need to (cannot) remove s_endOfTaskRunner from the current
// message loop, because the message loop is already destructed before
// the shutdown() is called.
delete s_endOfTaskRunner;
s_endOfTaskRunner = 0;
- }
- // currentThread() is null if we are running on a thread without a message loop.
- if (Platform::current()->currentThread()) {
ASSERT(s_pendingGCRunner);
delete s_pendingGCRunner;
s_pendingGCRunner = 0;
« no previous file with comments | « third_party/WebKit/Source/platform/SharedBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698