mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
moebius#157: The Performance Observer (improvements)
https://github.com/MoonchildProductions/moebius/pull/157
This commit is contained in:
parent
f2565dab54
commit
6a97ee9379
13 changed files with 107 additions and 150 deletions
|
|
@ -66,6 +66,7 @@ PerformanceObserverEntryList::GetEntries(
|
|||
|
||||
aRetval.AppendElement(entry);
|
||||
}
|
||||
aRetval.Sort(PerformanceEntryComparator());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -79,6 +80,7 @@ PerformanceObserverEntryList::GetEntriesByType(
|
|||
aRetval.AppendElement(entry);
|
||||
}
|
||||
}
|
||||
aRetval.Sort(PerformanceEntryComparator());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -88,9 +90,18 @@ PerformanceObserverEntryList::GetEntriesByName(
|
|||
nsTArray<RefPtr<PerformanceEntry>>& aRetval)
|
||||
{
|
||||
aRetval.Clear();
|
||||
const bool typePassed = aEntryType.WasPassed();
|
||||
for (const RefPtr<PerformanceEntry>& entry : mEntries) {
|
||||
if (entry->GetName().Equals(aName)) {
|
||||
aRetval.AppendElement(entry);
|
||||
if (!entry->GetName().Equals(aName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typePassed &&
|
||||
!entry->GetEntryType().Equals(aEntryType.Value())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
aRetval.AppendElement(entry);
|
||||
}
|
||||
aRetval.Sort(PerformanceEntryComparator());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue