MCPcopy Index your code
hub / github.com/nodejs/node / disableHooks

Function disableHooks

lib/internal/async_hooks.js:403–413  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401}
402
403function 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
415function disablePromiseHookIfNecessary() {
416 if (!wantPromiseHook && stopPromiseHook) {

Callers 1

disableMethod · 0.85

Calls 1

enqueueMicrotaskFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…