Lines Matching refs:asyncId
116 function callbackTrampoline(asyncId, resource, cb, ...args) {
120 if (asyncId !== 0 && hasHooks(kBefore))
121 emitBeforeNative(asyncId);
124 if (asyncId === 0 && typeof domain_cb === 'function') {
131 if (asyncId !== 0 && hasHooks(kAfter))
132 emitAfterNative(asyncId);
190 function emitInitNative(asyncId, type, triggerAsyncId, resource) {
201 asyncId, type, triggerAsyncId,
221 // Called from native. The asyncId stack handling is taken care of there
223 function emitHook(symbol, asyncId) {
233 active_hooks.array[i][symbol](asyncId);
320 const asyncId = promise[async_id_symbol];
322 emitInitScript(asyncId, 'PROMISE', triggerAsyncId, promise);
332 const asyncId = promise[async_id_symbol];
333 registerDestroyHook(promise, asyncId);
338 const asyncId = promise[async_id_symbol];
340 emitBeforeScript(asyncId, triggerId, promise);
345 const asyncId = promise[async_id_symbol];
347 emitAfterNative(asyncId);
349 if (asyncId === executionAsyncId()) {
355 popAsyncContext(asyncId);
361 const asyncId = promise[async_id_symbol];
362 emitPromiseResolveNative(asyncId);
493 function emitInitScript(asyncId, type, triggerAsyncId, resource) {
503 emitInitNative(asyncId, type, triggerAsyncId, resource);
507 function emitBeforeScript(asyncId, triggerAsyncId, resource) {
508 pushAsyncContext(asyncId, triggerAsyncId, resource);
511 emitBeforeNative(asyncId);
515 function emitAfterScript(asyncId) {
517 emitAfterNative(asyncId);
519 popAsyncContext(asyncId);
523 function emitDestroyScript(asyncId) {
524 // Return early if there are no destroy callbacks, or invalid asyncId.
525 if (!hasHooks(kDestroy) || asyncId <= 0)
527 async_wrap.queueDestroyAsyncId(asyncId);
537 function pushAsyncContext(asyncId, triggerAsyncId, resource) {
541 return pushAsyncContext_(asyncId, triggerAsyncId);
545 async_id_fields[kExecutionAsyncId] = asyncId;
551 function popAsyncContext(asyncId) {
555 if (enabledHooksExist() && async_id_fields[kExecutionAsyncId] !== asyncId) {
557 return popAsyncContext_(asyncId);