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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp

Issue 2387963002: Add use counter for Long Task Observer (Closed)
Patch Set: sync and rebase update Created 4 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/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp
index 7fe01378dd6d20bde651ab601ab0b81c26ac056c..9f9ac198cc351c00122d123faead55542532a7f5 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp
@@ -7,9 +7,11 @@
#include "core/InstrumentingAgents.h"
#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
+#include "core/frame/DOMWindow.h"
#include "core/frame/Frame.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Location.h"
+#include "core/frame/UseCounter.h"
#include "core/inspector/InspectedFrames.h"
#include "core/timing/DOMWindowPerformance.h"
#include "core/timing/Performance.h"
@@ -40,6 +42,8 @@ InspectorWebPerfAgent::~InspectorWebPerfAgent() {
}
void InspectorWebPerfAgent::enable() {
+ // Update usage count.
+ UseCounter::count(m_localFrame, UseCounter::LongTaskObserver);
Platform::current()->currentThread()->addTaskTimeObserver(this);
Platform::current()->currentThread()->addTaskObserver(this);
m_localFrame->instrumentingAgents()->addInspectorWebPerfAgent(this);
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698