mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48: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;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
class nsPerformanceGroup;
|
||||
class nsPerformanceGroupDetails;
|
||||
|
||||
typedef mozilla::Vector<RefPtr<nsPerformanceGroup>, 8> GroupVector;
|
||||
typedef mozilla::Vector<RefPtr<nsPerformanceGroup>> GroupVector;
|
||||
|
||||
/**
|
||||
* A data structure for registering observers interested in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue