()
| 166 | let frame; |
| 167 | |
| 168 | function requestTimeCheck() { |
| 169 | if (frame) cancelAnimationFrame(frame); |
| 170 | |
| 171 | if (isDestroyed(owner) || isDestroying(owner)) { |
| 172 | return; |
| 173 | } |
| 174 | |
| 175 | frame = requestAnimationFrame(() => { |
| 176 | totalTimeWaited = new Date().getTime() - timeStarted; |
| 177 | |
| 178 | let timeSinceLastMutation = new Date().getTime() - lastMutationAt; |
| 179 | |
| 180 | if (totalTimeWaited >= MAX_TIMEOUT) { |
| 181 | return resolve(totalTimeWaited); |
| 182 | } |
| 183 | |
| 184 | if (timeSinceLastMutation >= TIME_SINCE_LAST_MUTATION) { |
| 185 | return resolve(totalTimeWaited); |
| 186 | } |
| 187 | |
| 188 | // eslint-disable-next-line ember/no-runloop |
| 189 | schedule('afterRender', requestTimeCheck); |
| 190 | }); |
| 191 | } |
| 192 | |
| 193 | // eslint-disable-next-line ember/no-runloop |
| 194 | schedule('afterRender', requestTimeCheck); |
nothing calls this directly
no outgoing calls
no test coverage detected