(promise, parent)
| 313 | } |
| 314 | |
| 315 | function trackPromise(promise, parent) { |
| 316 | if (promise[async_id_symbol]) { |
| 317 | return; |
| 318 | } |
| 319 | |
| 320 | // Get trigger id from parent async id before making the async id of the |
| 321 | // child so if a new one must be made it will be lower than the child. |
| 322 | const triggerAsyncId = parent ? getOrSetAsyncId(parent) : |
| 323 | getDefaultTriggerAsyncId(); |
| 324 | |
| 325 | promise[async_id_symbol] = newAsyncId(); |
| 326 | promise[trigger_async_id_symbol] = triggerAsyncId; |
| 327 | } |
| 328 | |
| 329 | function promiseInitHook(promise, parent) { |
| 330 | trackPromise(promise, parent); |
no test coverage detected
searching dependent graphs…