/third_party/node/lib/internal/ |
D | async_hooks.js | 118 function callbackTrampoline(asyncId, resource, cb, ...args) { argument 122 if (asyncId !== 0 && hasHooks(kBefore)) 123 emitBeforeNative(asyncId); 126 if (asyncId === 0 && typeof domain_cb === 'function') { 133 if (asyncId !== 0 && hasHooks(kAfter)) 134 emitAfterNative(asyncId); 194 function emitInitNative(asyncId, type, triggerAsyncId, resource) { argument 204 asyncId, type, triggerAsyncId, 226 function emitHook(symbol, asyncId) { argument 235 active_hooks.array[i][symbol](asyncId); [all …]
|
D | inspector_async_hook.js | 16 init(asyncId, type, triggerAsyncId, resource) { argument 23 this.promiseIds.add(asyncId); 25 inspector.asyncTaskScheduled(type, asyncId, recurring); 28 before(asyncId) { argument 29 if (this.promiseIds.has(asyncId)) 31 inspector.asyncTaskStarted(asyncId); 34 after(asyncId) { argument 35 if (this.promiseIds.has(asyncId)) 37 inspector.asyncTaskFinished(asyncId); 40 destroy(asyncId) { argument [all …]
|
D | trace_events_async_hooks.js | 44 init(asyncId, type, triggerAsyncId, resource) { argument 47 typeMemory.set(asyncId, type); 49 type, asyncId, 56 before(asyncId) { argument 57 const type = typeMemory.get(asyncId); 60 trace(kBeforeEvent, kTraceEventCategory, `${type}_CALLBACK`, asyncId); 63 after(asyncId) { argument 64 const type = typeMemory.get(asyncId); 67 trace(kEndEvent, kTraceEventCategory, `${type}_CALLBACK`, asyncId); 70 destroy(asyncId) { argument [all …]
|
D | timers.js | 156 const asyncId = resource[async_id_symbol] = newAsyncId(); 160 emitInit(asyncId, type, triggerAsyncId, resource); 458 const asyncId = immediate[async_id_symbol]; 459 emitBefore(asyncId, immediate[trigger_async_id_symbol], immediate); 471 emitDestroy(asyncId); 476 emitAfter(asyncId); 533 const asyncId = timer[async_id_symbol]; 543 emitDestroy(asyncId); 548 emitBefore(asyncId, timer[trigger_async_id_symbol], timer); 571 emitDestroy(asyncId); [all …]
|
/third_party/node/test/async-hooks/ |
D | test-async-exec-resource-match.js | 19 (asyncId, type, triggerId, resource) => { 21 firstSeenAsyncId = asyncId; 23 assert.ok(idResMap.get(asyncId) === undefined); 24 idResMap.set(asyncId, resource); 26 before(asyncId) { argument 27 if (asyncId >= firstSeenAsyncId) { 28 beforeHook(asyncId); 31 after(asyncId) { argument 32 if (asyncId >= firstSeenAsyncId) { 33 afterHook(asyncId); [all …]
|
D | test-async-await.js | 29 function oninit(asyncId, type) { argument 31 promisesInitState.set(asyncId, 'inited'); 35 function onbefore(asyncId) { argument 36 if (!promisesInitState.has(asyncId)) { 39 promisesExecutionState.set(asyncId, 'before'); 42 function onafter(asyncId) { argument 43 if (!promisesInitState.has(asyncId)) { 47 assert.strictEqual(promisesExecutionState.get(asyncId), 'before', 50 assert.strictEqual(promisesInitState.get(asyncId), 'resolved', 53 promisesExecutionState.set(asyncId, 'after'); [all …]
|
D | test-emit-after-on-destroyed.js | 26 const asyncId = newAsyncId(); constant 28 emitInit(asyncId, 'event1', triggerId, {}); 29 emitBefore(asyncId, triggerId); 30 emitAfter(asyncId); 31 emitDestroy(asyncId); 36 const asyncId = newAsyncId(); constant 38 emitInit(asyncId, 'event2', triggerId, {}); 39 emitDestroy(asyncId); 42 emitAfter(asyncId);
|
D | test-emit-before-on-destroyed.js | 26 const asyncId = newAsyncId(); constant 28 emitInit(asyncId, 'event1', triggerId, {}); 29 emitBefore(asyncId, triggerId); 30 emitAfter(asyncId); 31 emitDestroy(asyncId); 36 const asyncId = newAsyncId(); constant 38 emitInit(asyncId, 'event2', triggerId, {}); 39 emitDestroy(asyncId); 42 emitBefore(asyncId, triggerId);
|
D | test-destroy-not-blocked.js | 32 assert.strictEqual(activeId, res.asyncId()); 36 assert.strictEqual(activeId, res.asyncId())) 43 assert.strictEqual(activeId, res.asyncId()); 47 assert.strictEqual(activeId, res.asyncId())) 54 assert.strictEqual(activeId, res.asyncId()); 64 assert.strictEqual(activeId, res.asyncId()); 68 assert.strictEqual(activeId, res.asyncId())) 75 assert.strictEqual(activeId, res.asyncId()); 84 assert.strictEqual(activeId, res.asyncId());
|
D | test-httpparser-reuse.js | 20 init(asyncId, type, triggerAsyncId, resource) { argument 23 incomingMessageParser.push(asyncId); 26 clientRequestParser.push(asyncId); 32 `resource reused: ${asyncId}, ${triggerAsyncId}, ${type}` 37 destroy(asyncId) { argument 38 if (destroyed.includes(asyncId)) { 39 dupDestroys.push(asyncId); 41 destroyed.push(asyncId);
|
D | test-improper-order.js | 26 const asyncId = newAsyncId(); constant 28 emitInit(asyncId, 'event1', triggerId, {}); 29 emitBefore(asyncId, triggerId); 30 emitAfter(asyncId); 36 const asyncId = newAsyncId(); constant 38 emitInit(asyncId, 'event2', triggerId, {}); 41 emitAfter(asyncId);
|
D | test-async-exec-resource-http.js | 14 init(asyncId, type, triggerAsyncId, resource) { argument 15 hooked[asyncId] = resource;
|
D | test-async-exec-resource-http-32060.js | 13 init(asyncId, type, triggerAsyncId, resource) { argument 14 hooked[asyncId] = resource;
|
/third_party/node/test/parallel/ |
D | test-async-hooks-correctly-switch-promise-hook.js | 14 init(asyncId, type) { argument 15 layers.set(asyncId, { 23 before(asyncId) { argument 24 if (layers.has(asyncId)) { 25 layers.get(asyncId).before = true; 28 after(asyncId) { argument 29 if (layers.has(asyncId)) { 30 layers.get(asyncId).after = true; 33 promiseResolve(asyncId) { argument 34 if (layers.has(asyncId)) { [all …]
|
D | test-async-hooks-http-parser-destroy.js | 20 init: (asyncId, type) => { argument 22 createdIdsIncomingMessage.push(asyncId); 25 createdIdsClientRequest.push(asyncId); 28 destroy: (asyncId) => { argument 29 if (createdIdsIncomingMessage.includes(asyncId)) { 30 destroyedIdsIncomingMessage.push(asyncId); 32 if (createdIdsClientRequest.includes(asyncId)) { 33 destroyedIdsClientRequest.push(asyncId);
|
D | test-async-hooks-destroy-on-gc.js | 13 destroy: common.mustCallAtLeast((asyncId) => { 14 destroyedIds.add(asyncId); 18 let asyncId = null; variable 21 asyncId = res.asyncId(); 26 setImmediate(() => assert.ok(destroyedIds.has(asyncId)));
|
D | test-asyncresource-bind.js | 12 const asyncId = executionAsyncId(); constant 13 assert.notStrictEqual(asyncId, fn()); 32 const asyncId = executionAsyncId(); constant 33 assert.strictEqual(asyncResource.asyncId(), fn2()); 34 assert.notStrictEqual(asyncId, fn2());
|
D | test-async-hooks-http-agent.js | 59 const asyncId = res.socket[async_id_symbol]; constant 60 assert.ok(asyncId > 0, `${asyncId} > 0`);
|
D | test-async-hooks-async-await.js | 11 init: (asyncId, type, triggerAsyncId) => { argument 12 asyncIds.push([triggerAsyncId, asyncId]);
|
D | test-async-hooks-recursive-stack-runInAsyncScope.js | 11 assert.strictEqual(a.asyncId(), async_hooks.executionAsyncId()); 15 assert.strictEqual(a.asyncId(), async_hooks.executionAsyncId());
|
/third_party/node/benchmark/async_hooks/ |
D | async-resource-vs-destroy.js | 53 function init(asyncId, type, triggerAsyncId, resource) { argument 78 const asyncId = executionAsyncId(); 79 return transactions.has(asyncId) ? transactions.get(asyncId) : null; 83 const asyncId = executionAsyncId(); 84 transactions.set(asyncId, value); 87 function init(asyncId, type, triggerAsyncId, resource) { argument 88 transactions.set(asyncId, getCLS()); 91 function destroy(asyncId) { argument 92 transactions.delete(asyncId);
|
/third_party/node/lib/internal/process/ |
D | task_queues.js | 71 const asyncId = tock[async_id_symbol]; 72 emitBefore(asyncId, tock[trigger_async_id_symbol], tock); 90 emitDestroy(asyncId); 93 emitAfter(asyncId); 124 const asyncId = newAsyncId(); 127 [async_id_symbol]: asyncId, 133 emitInit(asyncId, 'TickObject', triggerAsyncId, tickObject);
|
/third_party/node/lib/ |
D | async_hooks.js | 171 const asyncId = newAsyncId(); 172 this[async_id_symbol] = asyncId; 180 emitInit(asyncId, type, triggerAsyncId, this); 187 registerDestroyHook(this, asyncId, destroyed); 192 const asyncId = this[async_id_symbol]; 193 emitBefore(asyncId, this[trigger_async_id_symbol], this); 202 emitAfter(asyncId); 214 asyncId() { method in AsyncResource 251 init(asyncId, type, triggerAsyncId, resource) { argument
|
D | domain.js | 73 init(asyncId, type, triggerAsyncId, resource) { argument 76 pairing.set(asyncId, process.domain[kWeak]); 89 before(asyncId) { argument 90 const current = pairing.get(asyncId); 100 after(asyncId) { argument 101 const current = pairing.get(asyncId); 108 destroy(asyncId) { argument 109 pairing.delete(asyncId); // cleaning up
|
/third_party/node/doc/api/ |
D | async_hooks.md | 60 // resource referenced by "asyncId" may not have been populated. 61 function init(asyncId, type, triggerAsyncId, resource) { } 66 function before(asyncId) { } 69 function after(asyncId) { } 72 function destroy(asyncId) { } 77 function promiseResolve(asyncId) { } 109 init(asyncId, type, triggerAsyncId, resource) { }, 110 destroy(asyncId) { } 118 init(asyncId, type, triggerAsyncId, resource) { } 119 destroy(asyncId) {} [all …]
|