| Index: third_party/WebKit/Source/core/frame/PerformanceMonitor.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/PerformanceMonitor.cpp b/third_party/WebKit/Source/core/frame/PerformanceMonitor.cpp
|
| index c4a82e0b65731d7e7e01be7def8b0fd8760070be..79c29beb4a2fbddbb550923788613bd85b9981c0 100644
|
| --- a/third_party/WebKit/Source/core/frame/PerformanceMonitor.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/PerformanceMonitor.cpp
|
| @@ -56,10 +56,7 @@ void PerformanceMonitor::performanceObserverAdded(Performance* performance) {
|
| // static
|
| void PerformanceMonitor::performanceObserverRemoved(Performance* performance) {
|
| LocalFrame* frame = performance->frame();
|
| - if (!frame) {
|
| - // TODO: instrument local frame removal in order to clean up.
|
| - return;
|
| - }
|
| + DCHECK(frame);
|
| PerformanceMonitor* monitor = frame->performanceMonitor();
|
| monitor->m_webPerformanceObservers.remove(performance);
|
| monitor->updateInstrumentation();
|
| @@ -155,7 +152,11 @@ PerformanceMonitor* PerformanceMonitor::instrumentingMonitor(
|
| PerformanceMonitor::PerformanceMonitor(LocalFrame* localRoot)
|
| : m_localRoot(localRoot) {}
|
|
|
| -PerformanceMonitor::~PerformanceMonitor() {}
|
| +PerformanceMonitor::~PerformanceMonitor() {
|
| + m_webPerformanceObservers.clear();
|
| + m_loggingEnabled = false;
|
| + updateInstrumentation();
|
| +}
|
|
|
| void PerformanceMonitor::setLoggingEnabled(bool enabled) {
|
| m_loggingEnabled = enabled;
|
|
|