Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/ui.js

Issue 6612223174639616: Issue 1602 - Use ES6 generators instead of legacy generators (Closed)
Patch Set: Created March 31, 2015, 6:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/synchronizer.js ('k') | metadata.gecko » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
},
/**
« no previous file with comments | « lib/synchronizer.js ('k') | metadata.gecko » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld