mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1645339 - Use range-based for with nsTObserverArray in dom/performance. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D79502
This commit is contained in:
parent
285eb33a09
commit
d35ea0c25f
@ -596,10 +596,9 @@ void Performance::QueueEntry(PerformanceEntry* aEntry) {
|
||||
}
|
||||
|
||||
nsTObserverArray<PerformanceObserver*> interestedObservers;
|
||||
nsTObserverArray<PerformanceObserver*>::ForwardIterator observerIt(
|
||||
mObservers);
|
||||
while (observerIt.HasMore()) {
|
||||
PerformanceObserver* observer = observerIt.GetNext();
|
||||
/// XXX We could use a NonObservingRange here and then
|
||||
/// TransformIf(IntoNewArray).
|
||||
for (PerformanceObserver* observer : mObservers.ForwardRange()) {
|
||||
if (observer->ObservesTypeOfEntry(aEntry)) {
|
||||
interestedObservers.AppendElement(observer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user