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

Function setupWarningHandler

lib/internal/process/pre_execution.js:334–352  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

332}
333
334function setupWarningHandler() {
335 const {
336 onWarning,
337 resetForSerialization,
338 } = require('internal/process/warning');
339 if (getOptionValue('--warnings') &&
340 process.env.NODE_NO_WARNINGS !== '1') {
341 process.on('warning', onWarning);
342
343 // The code above would add the listener back during deserialization,
344 // if applicable.
345 if (isBuildingSnapshot()) {
346 addSerializeCallback(() => {
347 process.removeListener('warning', onWarning);
348 resetForSerialization();
349 });
350 }
351 }
352}
353
354// https://websockets.spec.whatwg.org/
355function setupWebsocket() {

Callers 1

prepareExecutionFunction · 0.85

Calls 7

getOptionValueFunction · 0.85
isBuildingSnapshotFunction · 0.85
addSerializeCallbackFunction · 0.85
resetForSerializationFunction · 0.85
requireFunction · 0.50
onMethod · 0.45
removeListenerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…