| 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 f48991b039240fe19ca480552461236ebabc84d6..1c5fb3d84657a04bc2e19f2a783c6f78b93ea257 100644
|
| --- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
|
| +++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
|
| @@ -352,6 +352,12 @@ void PerformanceBase::registerPerformanceObserver(PerformanceObserver& observer)
|
|
|
| void PerformanceBase::unregisterPerformanceObserver(PerformanceObserver& oldObserver)
|
| {
|
| + ASSERT(isMainThread());
|
| + // Deliver any pending observations on this observer before unregistering.
|
| + if (m_activeObservers.contains(&oldObserver) && !oldObserver.shouldBeSuspended()) {
|
| + oldObserver.deliver();
|
| + m_activeObservers.remove(&oldObserver);
|
| + }
|
| m_observers.remove(&oldObserver);
|
| updatePerformanceObserverFilterOptions();
|
| }
|
|
|