| 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 3e085f1dad921f58b49bdf0dda7b619061c1993c..b7ae43cbda1edd731a87069bf0d2fa42defc2e2e 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "core/inspector/InspectorWebPerfAgent.h"
|
|
|
| +#include "core/InstrumentingAgents.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/ExecutionContext.h"
|
| #include "core/frame/LocalFrame.h"
|
| @@ -16,14 +17,27 @@ namespace blink {
|
| InspectorWebPerfAgent::InspectorWebPerfAgent(InspectedFrames* inspectedFrames)
|
| : m_inspectedFrames(inspectedFrames)
|
| {
|
| +}
|
| +
|
| +InspectorWebPerfAgent::~InspectorWebPerfAgent()
|
| +{
|
| + DCHECK(!m_enabled);
|
| +}
|
| +
|
| +void InspectorWebPerfAgent::enable()
|
| +{
|
| Platform::current()->currentThread()->addTaskTimeObserver(this);
|
| Platform::current()->currentThread()->addTaskObserver(this);
|
| + m_inspectedFrames->root()->instrumentingAgents()->addInspectorWebPerfAgent(this);
|
| + m_enabled = true;
|
| }
|
|
|
| -InspectorWebPerfAgent::~InspectorWebPerfAgent()
|
| +void InspectorWebPerfAgent::disable()
|
| {
|
| Platform::current()->currentThread()->removeTaskTimeObserver(this);
|
| Platform::current()->currentThread()->removeTaskObserver(this);
|
| + m_inspectedFrames->root()->instrumentingAgents()->removeInspectorWebPerfAgent(this);
|
| + m_enabled = false;
|
| }
|
|
|
| void InspectorWebPerfAgent::willExecuteScript(ExecutionContext* context)
|
|
|