mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1229032 - don't copy arrays in PerformanceObserver::Observe; r=baku
Once we've sanitized the input data, there's no need to copy our newly-allocated array into mEntryTypes; we can simply swap them and avoid extra allocations.
This commit is contained in:
parent
5ff39d1981
commit
a06468e92d
@ -168,7 +168,7 @@ PerformanceObserver::Observe(const PerformanceObserverInit& aOptions,
|
||||
return;
|
||||
}
|
||||
|
||||
mEntryTypes = validEntryTypes;
|
||||
mEntryTypes.SwapElements(validEntryTypes);
|
||||
|
||||
mPerformance->AddObserver(this);
|
||||
mConnected = true;
|
||||
|
Loading…
Reference in New Issue
Block a user