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

Unified Diff: lib/downloader.js

Issue 6341149593698304: Issue 301 - Change for each to for .. of .. in lib/ (Closed)
Patch Set: Created April 10, 2014, 5:02 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/contentPolicy.js ('k') | lib/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/downloader.js
===================================================================
--- a/lib/downloader.js
+++ b/lib/downloader.js
@@ -115,17 +115,17 @@ Downloader.prototype =
onDownloadError: null,
/**
* Checks whether anything needs downloading.
*/
_doCheck: function()
{
let now = Date.now();
- for each (let downloadable in this.dataSource())
+ for (let downloadable of this.dataSource())
{
if (downloadable.lastCheck && now - downloadable.lastCheck > this.maxAbsenceInterval)
{
// No checks for a long time interval - user must have been offline, e.g.
// during a weekend. Increase soft expiration to prevent load peaks on the
// server.
downloadable.softExpiration += now - downloadable.lastCheck;
}
« no previous file with comments | « lib/contentPolicy.js ('k') | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld