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

Function intercepted

lib/domain.js:380–401  ·  view source on GitHub ↗
(_this, self, cb, fnargs)

Source from the content-addressed store, hash-verified

378
379
380function intercepted(_this, self, cb, fnargs) {
381 if (fnargs[0] && fnargs[0] instanceof Error) {
382 const er = fnargs[0];
383 er.domainBound = cb;
384 er.domainThrown = false;
385 ObjectDefineProperty(er, 'domain', {
386 __proto__: null,
387 configurable: true,
388 enumerable: false,
389 value: self,
390 writable: true,
391 });
392 self.emit('error', er);
393 return;
394 }
395
396 self.enter();
397 const ret = ReflectApply(cb, _this, ArrayPrototypeSlice(fnargs, 1));
398 self.exit();
399
400 return ret;
401}
402
403
404Domain.prototype.intercept = function(cb) {

Callers 1

runInterceptedFunction · 0.85

Calls 3

emitMethod · 0.45
enterMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…