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 authored and Myles Borins committed 2017-12-12 03:28:24 -05:00
1 parent fb553b5b59
commit c5d20b36e1
1 file changed
-7
-7
View File
@@ -24,13 +24,6 @@ function objectToString(o) {
// 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;
}