mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
Revert "Reduce number of allocations in AutoStopwatch"
This reverts commit 3476c1d60ec29c5497123194acd7a9310b1023d2.
This commit is contained in:
parent
059aeea416
commit
dce38e8d76
4 changed files with 11 additions and 25 deletions
|
|
@ -1310,12 +1310,8 @@ nsPerformanceStatsService::GetResources(uint64_t* userTime,
|
|||
|
||||
void
|
||||
nsPerformanceStatsService::NotifyJankObservers(const mozilla::Vector<uint64_t>& aPreviousJankLevels) {
|
||||
|
||||
// The move operation is generally constant time, unless `mPendingAlerts.length()` is very small, in which case it's
|
||||
// fast anyway.
|
||||
GroupVector alerts(Move(mPendingAlerts));
|
||||
mPendingAlerts = GroupVector(); // Reconstruct after `Move`.
|
||||
|
||||
GroupVector alerts;
|
||||
mPendingAlerts.swap(alerts);
|
||||
if (!mPendingAlertsCollector) {
|
||||
// We are shutting down.
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue