diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2017-04-15 00:13:27 -0400 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2017-04-15 00:13:27 -0400 |
commit | b257582e01865d681a0bf28e4f60972b3b226b94 (patch) | |
tree | 629abfc826e6dae17882a0a04b7494e115cf0339 /data/extensions | |
parent | 6d300cb77cbc78b1985a9fea7ca6ca4f379fbdf5 (diff) |
Fix Spyblock for a api change in v52
Diffstat (limited to 'data/extensions')
-rw-r--r-- | data/extensions/spyblock@gnu.org/lib/ui.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/data/extensions/spyblock@gnu.org/lib/ui.js b/data/extensions/spyblock@gnu.org/lib/ui.js index 43c770a..6009f9e 100644 --- a/data/extensions/spyblock@gnu.org/lib/ui.js +++ b/data/extensions/spyblock@gnu.org/lib/ui.js @@ -657,12 +657,18 @@ let UI = exports.UI = // On Linux the list returned will be empty, see bug 156333. Fall back to random order. enumerator = Services.wm.getEnumerator(null); } - while (enumerator.hasMoreElements()) + + let generate = function*() { - let window = enumerator.getNext().QueryInterface(Ci.nsIDOMWindow); - if (isKnownWindow(window)) - yield window; - } + while (enumerator.hasMoreElements()) + { + let window = enumerator.getNext().QueryInterface(Ci.nsIDOMWindow); + if (isKnownWindow(window)) + yield window; + } + }; + + return generate(); }, /** |