(asyncId)
| 560 | |
| 561 | // This is the equivalent of the native pop_async_ids() call. |
| 562 | function popAsyncContext(asyncId) { |
| 563 | const stackLength = async_hook_fields[kStackLength]; |
| 564 | if (stackLength === 0) return false; |
| 565 | |
| 566 | if (async_hook_fields[kCheck] > 0 && async_id_fields[kExecutionAsyncId] !== asyncId) { |
| 567 | // Do the same thing as the native code (i.e. crash hard). |
| 568 | return popAsyncContext_(asyncId); |
| 569 | } |
| 570 | |
| 571 | const offset = stackLength - 1; |
| 572 | async_id_fields[kExecutionAsyncId] = async_wrap.async_ids_stack[2 * offset]; |
| 573 | async_id_fields[kTriggerAsyncId] = async_wrap.async_ids_stack[2 * offset + 1]; |
| 574 | execution_async_resources.pop(); |
| 575 | async_hook_fields[kStackLength] = offset; |
| 576 | return offset > 0; |
| 577 | } |
| 578 | |
| 579 | |
| 580 | function executionAsyncId() { |
no test coverage detected
searching dependent graphs…