Chromium Code Reviews| 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..bb0dc718a4cac5afa140b7dcfca9a1e55b896266 100644 |
| --- a/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp |
| +++ b/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.cpp |
| @@ -16,11 +16,19 @@ namespace blink { |
| InspectorWebPerfAgent::InspectorWebPerfAgent(InspectedFrames* inspectedFrames) |
| : m_inspectedFrames(inspectedFrames) |
| { |
| +} |
| + |
| +InspectorWebPerfAgent::~InspectorWebPerfAgent() |
| +{ |
|
dgozman
2016/09/17 01:11:00
Let's either call disableObserver() from here or D
panicker
2016/09/17 03:04:00
How's this?
panicker
2016/09/18 17:49:59
hmm it's not okay to access potentially finalized
dgozman
2016/09/19 17:55:59
Both. I propose to have |enabled_| field, update i
panicker
2016/09/20 12:00:39
Done.
|
| +} |
| + |
| +void InspectorWebPerfAgent::enableObserver() |
| +{ |
| Platform::current()->currentThread()->addTaskTimeObserver(this); |
| Platform::current()->currentThread()->addTaskObserver(this); |
| } |
| -InspectorWebPerfAgent::~InspectorWebPerfAgent() |
| +void InspectorWebPerfAgent::disableObserver() |
| { |
| Platform::current()->currentThread()->removeTaskTimeObserver(this); |
| Platform::current()->currentThread()->removeTaskObserver(this); |