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:
Gus Caplan 2017-12-03 01:31:27 -06:00 committed by Anatoli Papirovski
parent 0ab98f1e60
commit 59711abf54
No known key found for this signature in database
GPG Key ID: 614E2E1ABEB4B2C0

View File

@ -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;
}