()
| 136 | } |
| 137 | |
| 138 | function flushIntervalHandlers() { |
| 139 | // Copy the array. In case setInterval/clearInterval is invoked in the callback. |
| 140 | const savedIntervalHandlers = intervalHandlers.slice(); |
| 141 | for (let i = 0; i < savedIntervalHandlers.length; i++) { |
| 142 | const handler = savedIntervalHandlers[i]; |
| 143 | if (handler.frame === frameIdx) { |
| 144 | try { |
| 145 | handler.callback(); |
| 146 | } |
| 147 | catch (e) { |
| 148 | // Catch error to avoid following tasks. |
| 149 | __VRT_LOG_ERRORS__(e.toString()); |
| 150 | } |
| 151 | handler.frame += handler.intervalFrame; |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | /** Mock Date */ |
| 157 |
no outgoing calls
no test coverage detected
searching dependent graphs…