lib: require globals instead of using the global proxy

In addition, use process.stderr instead of console.error when
there is no need to swallow the error.

PR-URL: https://github.com/nodejs/node/pull/27112
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Joyee Cheung 2019-04-06 05:56:00 +08:00
parent 7938238b31
commit a38e9c438a
No known key found for this signature in database
GPG key ID: 92B78A53C8303B8D
17 changed files with 42 additions and 24 deletions

View file

@ -47,6 +47,7 @@ const {
ERR_INVALID_PERFORMANCE_MARK
} = require('internal/errors').codes;
const { setImmediate } = require('timers');
const kHandle = Symbol('handle');
const kMap = Symbol('map');
const kCallback = Symbol('callback');