()
| 401 | } |
| 402 | |
| 403 | function disableHooks() { |
| 404 | async_hook_fields[kCheck] -= 1; |
| 405 | |
| 406 | wantPromiseHook = false; |
| 407 | |
| 408 | setCallbackTrampoline(); |
| 409 | |
| 410 | // Delay the call to `disablePromiseHook()` because we might currently be |
| 411 | // between the `before` and `after` calls of a Promise. |
| 412 | enqueueMicrotask(disablePromiseHookIfNecessary); |
| 413 | } |
| 414 | |
| 415 | function disablePromiseHookIfNecessary() { |
| 416 | if (!wantPromiseHook && stopPromiseHook) { |
no test coverage detected
searching dependent graphs…