/third_party/node/lib/internal/ |
H A D | inspector_async_hook.js | 16 init(asyncId, type, triggerAsyncId, resource) { 23 this.promiseIds.add(asyncId); 25 inspector.asyncTaskScheduled(type, asyncId, recurring); 28 before(asyncId) { 29 if (this.promiseIds.has(asyncId)) 31 inspector.asyncTaskStarted(asyncId); 34 after(asyncId) { 35 if (this.promiseIds.has(asyncId)) 37 inspector.asyncTaskFinished(asyncId); 40 destroy(asyncId) { [all...] |
H A D | async_hooks.js | 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) { [all...] |
H A D | trace_events_async_hooks.js | 41 // non-init events, use a map to manually map the asyncId to the type name. 44 init(asyncId, type, triggerAsyncId, resource) { 47 typeMemory.set(asyncId, type); 49 type, asyncId, 56 before(asyncId) { 57 const type = typeMemory.get(asyncId); 60 trace(kBeforeEvent, kTraceEventCategory, `${type}_CALLBACK`, asyncId); 63 after(asyncId) { 64 const type = typeMemory.get(asyncId); 67 trace(kEndEvent, kTraceEventCategory, `${type}_CALLBACK`, asyncId); [all...] |
H A D | timers.js | 107 const async_id_symbol = Symbol('asyncId'); 160 const asyncId = resource[async_id_symbol] = newAsyncId(); 164 emitInit(asyncId, type, triggerAsyncId, resource); 470 const asyncId = immediate[async_id_symbol]; 471 emitBefore(asyncId, immediate[trigger_async_id_symbol], immediate); 483 emitDestroy(asyncId); 488 emitAfter(asyncId); 545 const asyncId = timer[async_id_symbol]; 555 emitDestroy(asyncId); 560 emitBefore(asyncId, time [all...] |
/third_party/node/test/async-hooks/ |
H A D | test-async-await.js | 17 // Either 'before' or 'after' AND asyncId must be present in the other map 29 function oninit(asyncId, type) { 31 promisesInitState.set(asyncId, 'inited'); 35 function onbefore(asyncId) { 36 if (!promisesInitState.has(asyncId)) { 39 promisesExecutionState.set(asyncId, 'before'); 42 function onafter(asyncId) { 43 if (!promisesInitState.has(asyncId)) { 47 assert.strictEqual(promisesExecutionState.get(asyncId), 'before', 50 assert.strictEqual(promisesInitState.get(asyncId), 'resolve [all...] |
H A D | test-httpparser-reuse.js | 20 init(asyncId, type, triggerAsyncId, resource) { 23 incomingMessageParser.push(asyncId); 26 clientRequestParser.push(asyncId); 32 `resource reused: ${asyncId}, ${triggerAsyncId}, ${type}`, 37 destroy(asyncId) { 38 if (destroyed.includes(asyncId)) { 39 dupDestroys.push(asyncId); 41 destroyed.push(asyncId);
|
H A 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());
|
H A D | test-embedder.api.async-resource.js | 46 assert.strictEqual(typeof alcaEvent.asyncId(), 'number'); 47 assert.notStrictEqual(alcaEvent.asyncId(), alcaTriggerId);
|
/third_party/node/test/parallel/ |
H A D | test-eventemitter-asyncresource.js | 23 function log(asyncId, name) { 24 const entry = eventMap.get(asyncId); 29 init(asyncId, type, triggerAsyncId, resource) { 31 eventMap.set(asyncId, [ 42 before(asyncId) { log(asyncId, 'before'); }, 43 after(asyncId) { log(asyncId, 'after'); }, 44 destroy(asyncId) { log(asyncId, 'destro [all...] |
H A D | test-async-hooks-http-parser-destroy.js | 20 init: (asyncId, type) => { 22 createdIdsIncomingMessage.push(asyncId); 25 createdIdsClientRequest.push(asyncId); 28 destroy: (asyncId) => { 29 if (createdIdsIncomingMessage.includes(asyncId)) { 30 destroyedIdsIncomingMessage.push(asyncId); 32 if (createdIdsClientRequest.includes(asyncId)) { 33 destroyedIdsClientRequest.push(asyncId);
|
H A D | test-worker-messageport-hasref.js | 10 init(asyncId, type, triggerAsyncId, resource) { 12 m.set(asyncId, { type, resource }); 15 destroy(asyncId) { 16 m.delete(asyncId); 22 for (const asyncId of m.keys()) { 23 const { type, resource } = m.get(asyncId);
|
H A D | test-async-hooks-recursive-stack-runInAsyncScope.js | 11 assert.strictEqual(a.asyncId(), async_hooks.executionAsyncId()); 15 assert.strictEqual(a.asyncId(), async_hooks.executionAsyncId());
|
H A D | test-async-hooks-execution-async-resource.js | 14 init(asyncId, type, triggerAsyncId, resource) {
|
H A D | test-async-hooks-execution-async-resource-await.js | 16 init(asyncId, type, triggerAsyncId, resource) {
|
/third_party/node/benchmark/async_hooks/ |
H A D | async-resource-vs-destroy.js | 53 function init(asyncId, type, triggerAsyncId, resource) { 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) { 88 transactions.set(asyncId, getCLS()); 91 function destroy(asyncId) { 92 transactions.delete(asyncId); [all...] |
/third_party/node/lib/internal/process/ |
H A 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); 123 const asyncId = newAsyncId(); 126 [async_id_symbol]: asyncId, 132 emitInit(asyncId, 'TickObject', triggerAsyncId, tickObject);
|
H A D | execution.js | 191 const asyncId = executionAsyncId(); 192 if (asyncId === 0) 195 emitAfter(asyncId);
|
/third_party/node/lib/ |
H A D | async_hooks.js | 177 const asyncId = newAsyncId(); 178 this[async_id_symbol] = asyncId; 186 emitInit(asyncId, type, triggerAsyncId, this); 193 registerDestroyHook(this, asyncId, destroyed); 198 const asyncId = this[async_id_symbol]; 199 emitBefore(asyncId, this[trigger_async_id_symbol], this); 208 emitAfter(asyncId); 220 asyncId() { 267 init(asyncId, type, triggerAsyncId, resource) {
|
H A D | domain.js | 76 init(asyncId, type, triggerAsyncId, resource) { 79 pairing.set(asyncId, process.domain[kWeak]); 98 before(asyncId) { 99 const current = pairing.get(asyncId); 109 after(asyncId) { 110 const current = pairing.get(asyncId); 117 destroy(asyncId) { 118 pairing.delete(asyncId); // cleaning up
|
H A D | _http_client.js | 733 const asyncId = socket._handle ? socket._handle.getAsyncId() : undefined; 736 defaultTriggerAsyncIdScope(asyncId, process.nextTick, emitFreeNT, req);
|
H A D | events.js | 181 get asyncId() { 184 return this.asyncResource.asyncId();
|
/third_party/node/lib/internal/test_runner/ |
H A D | harness.js | 29 testResources.set(reporterScope.asyncId(), reporterScope); 127 init(asyncId, type, triggerAsyncId, resource) { 129 testResources.set(asyncId, resource); 136 testResources.set(asyncId, parent); 139 destroy(asyncId) { 140 testResources.delete(asyncId);
|
/third_party/node/deps/npm/test/fixtures/ |
H A D | sandbox.js | 16 init: (asyncId, type, triggerAsyncId, resource) => { 18 chain.set(asyncId, triggerAsyncId) 20 before: (asyncId) => { 22 let parent = asyncId
|
/third_party/node/src/ |
H A D | inspector_js_api.cc | 226 static void* GetAsyncTask(int64_t asyncId) { in GetAsyncTask() argument 231 // On 32bit platforms, the 64bit asyncId would get truncated when converted in GetAsyncTask() 235 return reinterpret_cast<void*>(asyncId << 1); in GetAsyncTask()
|
H A D | async_wrap.cc | 197 double asyncId; member in node::DestroyParam 224 AsyncWrap::EmitDestroy(p->env, p->asyncId); in WeakCallback() 237 p->asyncId = args[1].As<Number>()->Value(); in RegisterDestroyHook()
|