(srv, c)
| 322 | } |
| 323 | |
| 324 | function fetchAll(srv, c) { |
| 325 | var done = true, returned = false; |
| 326 | srv.files.forEach(function(file) { |
| 327 | if (file.text != null) return; |
| 328 | if (srv.options.async) { |
| 329 | done = false; |
| 330 | srv.options.getFile(file.name, function(err, text) { |
| 331 | if (err && !returned) { returned = true; return c(err); } |
| 332 | updateText(file, text || "", srv); |
| 333 | fetchAll(srv, c); |
| 334 | }); |
| 335 | } else { |
| 336 | try { |
| 337 | updateText(file, srv.options.getFile(file.name) || "", srv); |
| 338 | } catch (e) { return c(e); } |
| 339 | } |
| 340 | }); |
| 341 | if (done) c(); |
| 342 | } |
| 343 | |
| 344 | function waitOnFetch(srv, timeBudget, c) { |
| 345 | var done = function() { |
nothing calls this directly
no test coverage detected