mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
assert: remove deprecated getFunction() usage
The method is meant to be removed by the V8 team. It is not a critical functionality that is removed, therefore no alternative is checked for either. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=9421 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/46661 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
6ff0b801f1
commit
a38de61e87
2 files changed
+2
-7
No files matched your search
+1
-6
@@ -308,12 +308,7 @@ function getErrMessage(message, fn) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
const fn = call.getFunction();
|
||||
if (!fn) {
|
||||
return message;
|
||||
}
|
||||
code = String(fn);
|
||||
identifier = `${code}${line}${column}`;
|
||||
return message;
|
||||
}
|
||||
|
||||
if (errorCache.has(identifier)) {
|
||||
|
||||
@@ -921,7 +921,7 @@ assert.throws(
|
||||
{
|
||||
code: 'ERR_ASSERTION',
|
||||
constructor: assert.AssertionError,
|
||||
message: 'The expression evaluated to a falsy value:\n\n assert(1 === 2)\n'
|
||||
message: 'false == true'
|
||||
}
|
||||
);
|
||||
assert.throws(
|
||||
|
||||
Reference in new issue
Block a user