util: remove check for global.process
process is explicitly passed by NativeModule now. PR-URL: https://github.com/nodejs/node/pull/17435 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
0ab98f1e60
commit
59711abf54
@ -33,13 +33,6 @@ const codesWarned = {};
|
||||
// Returns a modified function which warns once by default.
|
||||
// If --no-deprecation is set, then it is a no-op.
|
||||
function deprecate(fn, msg, code) {
|
||||
// Allow for deprecating things in the process of starting up.
|
||||
if (global.process === undefined) {
|
||||
return function(...args) {
|
||||
return deprecate(fn, msg).apply(this, args);
|
||||
};
|
||||
}
|
||||
|
||||
if (process.noDeprecation === true) {
|
||||
return fn;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user