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 Michaël Zasso
parent 1dc4dea215
commit dcd221ce69
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600

View File

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