Index: lib/ui.js |
=================================================================== |
--- a/lib/ui.js |
+++ b/lib/ui.js |
@@ -657,12 +657,18 @@ |
// 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(); |
}, |
/** |