signalTracker: Avoid creating a temporary keys array when clearing
We used to create a temporary array of signal tracker keys and then to iterate through them in order to untrack the objects, but the Map's can be iterated directly so let's just use their native forEach. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2366>
This commit is contained in:
parent
68ceed5c28
commit
74720f250e
@ -138,7 +138,7 @@ class SignalTracker {
|
||||
* @returns {void}
|
||||
*/
|
||||
clear() {
|
||||
[...this._map.keys()].forEach(obj => this.untrack(obj));
|
||||
this._map.forEach((_, obj) => this.untrack(obj));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user