errors: refactor to use more primordials

PR-URL: https://github.com/nodejs/node/pull/36651
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yash Ladha <yash@yashladha.in>
This commit is contained in:
Antoine du Hamel
2020-12-27 19:31:58 +01:00
committed by Node.js GitHub Bot
parent 11b34a916f
commit 91e9e013b0

View File

@@ -26,6 +26,7 @@ const {
ErrorCaptureStackTrace,
ErrorPrototypeToString,
JSONStringify,
MapPrototypeGet,
MathAbs,
MathMax,
Number,
@@ -404,7 +405,7 @@ function uvErrmapGet(name) {
if (!uvBinding.errmap) {
uvBinding.errmap = uvBinding.getErrorMap();
}
return uvBinding.errmap.get(name);
return MapPrototypeGet(uvBinding.errmap, name);
}
const captureLargerStackTrace = hideStackFrames(