( last )
| 1005 | } |
| 1006 | |
| 1007 | function process( last ) { |
| 1008 | function next() { |
| 1009 | process( last ); |
| 1010 | } |
| 1011 | var start = new Date().getTime(); |
| 1012 | config.depth = config.depth ? config.depth + 1 : 1; |
| 1013 | |
| 1014 | while ( config.queue.length && !config.blocking ) { |
| 1015 | if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) { |
| 1016 | config.queue.shift()(); |
| 1017 | } else { |
| 1018 | setTimeout( next, 13 ); |
| 1019 | break; |
| 1020 | } |
| 1021 | } |
| 1022 | config.depth--; |
| 1023 | if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) { |
| 1024 | done(); |
| 1025 | } |
| 1026 | } |
| 1027 | |
| 1028 | function saveGlobal() { |
| 1029 | config.pollution = []; |
no test coverage detected