Chromium Code Reviews| Index: third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
| diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
| index 512e6ebd6432ab2f21863f4b9c0c1e70544b9006..d6392e19600a5577c95a57ed1bbd2e55e964e965 100644 |
| --- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
| +++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
| @@ -400,6 +400,7 @@ void PerformanceBase::registerPerformanceObserver(PerformanceObserver& observer) |
| { |
| m_observerFilterOptions |= observer.filterOptions(); |
| m_observers.add(&observer); |
| + enableLongTaskInstrumentation(); |
| } |
| void PerformanceBase::unregisterPerformanceObserver(PerformanceObserver& oldObserver) |
| @@ -412,6 +413,7 @@ void PerformanceBase::unregisterPerformanceObserver(PerformanceObserver& oldObse |
| } |
| m_observers.remove(&oldObserver); |
| updatePerformanceObserverFilterOptions(); |
| + disableLongTaskInstrumentation(); |
|
dgozman
2016/09/17 01:11:00
Looks like previous line will enable instrumentati
panicker
2016/09/17 03:04:00
Yes this is strange, it's more clear to call from
|
| } |
| void PerformanceBase::updatePerformanceObserverFilterOptions() |
| @@ -420,6 +422,7 @@ void PerformanceBase::updatePerformanceObserverFilterOptions() |
| for (const auto& observer : m_observers) { |
| m_observerFilterOptions |= observer->filterOptions(); |
| } |
| + enableLongTaskInstrumentation(); |
| } |
| void PerformanceBase::notifyObserversOfEntry(PerformanceEntry& entry) |
| @@ -430,7 +433,7 @@ void PerformanceBase::notifyObserversOfEntry(PerformanceEntry& entry) |
| } |
| } |
| -bool PerformanceBase::hasObserverFor(PerformanceEntry::EntryType filterType) |
| +bool PerformanceBase::hasObserverFor(PerformanceEntry::EntryType filterType) const |
| { |
| return m_observerFilterOptions & filterType; |
| } |