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

Unified Diff: Source/web/WebLeakDetector.cpp

Issue 450183002: Add instance counters of Resource and AudioNode, and expose them via WebLeakDetector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « Source/modules/webaudio/AudioNode.cpp ('k') | public/web/WebLeakDetector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLeakDetector.cpp
diff --git a/Source/web/WebLeakDetector.cpp b/Source/web/WebLeakDetector.cpp
index d5af02963b14a540f6dcea55d5bff89e708da2e6..f0461b037e1cb9151fe036e39d62a04f942bf6c8 100644
--- a/Source/web/WebLeakDetector.cpp
+++ b/Source/web/WebLeakDetector.cpp
@@ -39,6 +39,7 @@
#include "core/fetch/ResourceFetcher.h"
#include "core/inspector/InspectorCounters.h"
#include "core/rendering/RenderObject.h"
+#include "modules/webaudio/AudioNode.h"
#include "platform/Timer.h"
#include "public/web/WebDocument.h"
#include "public/web/WebLocalFrame.h"
@@ -129,9 +130,11 @@ void WebLeakDetectorImpl::delayedReport(Timer<WebLeakDetectorImpl>*)
ASSERT(m_client);
WebLeakDetectorClient::Result result;
+ result.numberOfLiveAudioNodes = AudioNode::instanceCount();
result.numberOfLiveDocuments = InspectorCounters::counterValue(InspectorCounters::DocumentCounter);
result.numberOfLiveNodes = InspectorCounters::counterValue(InspectorCounters::NodeCounter);
result.numberOfLiveRenderObjects = RenderObject::instanceCount();
+ result.numberOfLiveResources = Resource::instanceCount();
m_client->onLeakDetectionComplete(result);
« no previous file with comments | « Source/modules/webaudio/AudioNode.cpp ('k') | public/web/WebLeakDetector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698