(err)
| 140 | } |
| 141 | // for internal use only |
| 142 | function finalizeAsync(err) { |
| 143 | if (err == null) { |
| 144 | if (task.err != null) succeed(new Assert) |
| 145 | } else { |
| 146 | if (err instanceof Error) fail(new Assert, err.message, err) |
| 147 | else fail(new Assert, String(err), null) |
| 148 | } |
| 149 | if (timeout !== undefined) timeout = clearTimeout(timeout) |
| 150 | if (current === cursor) next() |
| 151 | } |
| 152 | function startTimer() { |
| 153 | timeout = setTimeout(function() { |
| 154 | timeout = undefined |