( last )
| 1409 | } |
| 1410 | |
| 1411 | function process( last ) { |
| 1412 | function next() { |
| 1413 | process( last ); |
| 1414 | } |
| 1415 | var start = new Date().getTime(); |
| 1416 | config.depth = config.depth ? config.depth + 1 : 1; |
| 1417 | |
| 1418 | while ( config.queue.length && !config.blocking ) { |
| 1419 | if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) { |
| 1420 | config.queue.shift()(); |
| 1421 | } else { |
| 1422 | window.setTimeout( next, 13 ); |
| 1423 | break; |
| 1424 | } |
| 1425 | } |
| 1426 | config.depth--; |
| 1427 | if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) { |
| 1428 | done(); |
| 1429 | } |
| 1430 | } |
| 1431 | |
| 1432 | function saveGlobal() { |
| 1433 | config.pollution = []; |
no test coverage detected