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

Method _init

test/async-hooks/init-hooks.js:177–191  ·  view source on GitHub ↗
(uid, type, triggerAsyncId, handle)

Source from the content-addressed store, hash-verified

175 }
176
177 _init(uid, type, triggerAsyncId, handle) {
178 const activity = {
179 uid,
180 type,
181 triggerAsyncId,
182 // In some cases (e.g. Timeout) the handle is a function, thus the usual
183 // `typeof handle === 'object' && handle !== null` check can't be used.
184 handleIsObject: handle instanceof Object,
185 handle,
186 };
187 this._stamp(activity, 'init');
188 this._activities.set(uid, activity);
189 this._maybeLog(uid, type, 'init');
190 this.oninit(uid, type, triggerAsyncId, handle);
191 }
192
193 _before(uid) {
194 const h = this._getActivity(uid, 'before');

Callers 2

TLSSocketFunction · 0.80
wrap.jsFile · 0.80

Calls 3

_stampMethod · 0.95
_maybeLogMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected