( last )
| 1273 | } |
| 1274 | |
| 1275 | function process( last ) { |
| 1276 | function next() { |
| 1277 | process( last ); |
| 1278 | } |
| 1279 | var start = new Date().getTime(); |
| 1280 | config.depth = config.depth ? config.depth + 1 : 1; |
| 1281 | |
| 1282 | while ( config.queue.length && !config.blocking ) { |
| 1283 | if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) { |
| 1284 | config.queue.shift()(); |
| 1285 | } else { |
| 1286 | window.setTimeout( next, 13 ); |
| 1287 | break; |
| 1288 | } |
| 1289 | } |
| 1290 | config.depth--; |
| 1291 | if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) { |
| 1292 | done(); |
| 1293 | } |
| 1294 | } |
| 1295 | |
| 1296 | function saveGlobal() { |
| 1297 | config.pollution = []; |
no test coverage detected