зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1466071: Part 1: Prevent orderedWindows from changing while iterating. r=mikedeboer
--HG-- extra : histedit_source : fb13804cd558861c9a483a10e8451c571c4325c4
This commit is contained in:
Родитель
00974991a2
Коммит
54b423cf8e
|
@ -211,7 +211,9 @@ this.BrowserWindowTracker = {
|
|||
*/
|
||||
orderedWindows: {
|
||||
* [Symbol.iterator]() {
|
||||
for (let window of _trackedWindows)
|
||||
// Clone the windows array immediately as it may change during iteration,
|
||||
// we'd rather have an outdated order than skip/revisit windows.
|
||||
for (let window of [..._trackedWindows])
|
||||
yield window;
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче