diff options
author | Moonchild <moonchild@palemoon.org> | 2023-09-01 15:44:29 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-09-01 15:44:29 +0200 |
commit | 2d48de9998d5c4f768af051ce997777be126f8cd (patch) | |
tree | c6023db91bfadaa8e1d7c4c12d90ad63bf810454 /dom/performance/Performance.cpp | |
parent | 3b029cdfe482e5097ee09fa1998591faf9c1005b (diff) | |
parent | ee97a5dad40fb8d207b717cb2a0d487f54dd5f1d (diff) | |
download | uxp-2d48de9998d5c4f768af051ce997777be126f8cd.tar.gz |
Merge branch 'master' into releaseRC_20230901RB_20230904
Diffstat (limited to 'dom/performance/Performance.cpp')
-rwxr-xr-x | dom/performance/Performance.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/dom/performance/Performance.cpp b/dom/performance/Performance.cpp index 217faa5afe..e8a46409ef 100755 --- a/dom/performance/Performance.cpp +++ b/dom/performance/Performance.cpp @@ -712,9 +712,21 @@ Performance::QueueEntry(PerformanceEntry* aEntry) if (mObservers.IsEmpty()) { return; } - NS_OBSERVER_ARRAY_NOTIFY_XPCOM_OBSERVERS(mObservers, - PerformanceObserver, - QueueEntry, (aEntry)); + nsTObserverArray<PerformanceObserver*> interestedObservers; + nsTObserverArray<PerformanceObserver*>::ForwardIterator observerIt( + mObservers); + while (observerIt.HasMore()) { + PerformanceObserver* observer = observerIt.GetNext(); + if (observer->ObservesTypeOfEntry(aEntry)) { + interestedObservers.AppendElement(observer); + } + } + + if (interestedObservers.IsEmpty()) { + return; + } + + NS_OBSERVER_ARRAY_NOTIFY_XPCOM_OBSERVERS(interestedObservers, PerformanceObserver, QueueEntry, (aEntry)); if (!mPendingNotificationObserversTask) { RunNotificationObserversTask(); |