task_queues.js
imports internal/process/promisesTop-level non-require string call
SHA-256f2d36896d44e8899e0beca68746546e298d0dee948fd3cb2117abca3e56f6bc2
MaleculeH(Db)Md(In)
Evidence
⋯7 lines
8
9const {
10 // For easy access to the nextTick state in the C++ land,
11 // and to avoid unnecessary calls into JS land.
12 tickInfo,
13 // Used to run V8's micro task queue.
14 …
21:22…
22 listenForRejections,
23 processPromiseRejections,
24} = require('internal/process/promises');
25
26const {
⋯7 lines
35:22… _symbol, trigger_async_id_symbol },
36} = require('internal/async_hooks');
37const FixedQueue = require('internal/fixed_queue');
38
39const {
40 validateFunction,
41} = require('internal/validators');
42
43const { AsyncResource } = require('async_hooks');
44
45const AsyncContextFrame = require('internal/async_context_frame');
46
47const async_context_frame = Symbol('kAsyncContextFrame');
48
49// *Must* match Environment::TickInfo::Fields in src/env.h.
⋯4 lines
57:7… Info[kHasTickScheduled] = value ? 1 : 0;
58}
59
60const queue = new FixedQueue();
61
62// Should be in sync with RunNextTicksNative in node_task_queue.cc
63function runNextTicks() {
64 if (!hasTickScheduled() && …
110:65… s about to
111// exit since the callback would not have a chance to be executed.
112function nextTick(callback) {
113 validateFunction(callback, 'callback') …