Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a38de61

Browse filesBrowse files
BridgeARtargos
authored andcommitted
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: #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>
1 parent 6ff0b80 commit a38de61
Copy full SHA for a38de61

File tree

Expand file treeCollapse file tree

2 files changed

+2
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-7
lines changed
Open diff view settings
Collapse file

‎lib/assert.js‎

Copy file name to clipboardExpand all lines: lib/assert.js
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,7 @@ function getErrMessage(message, fn) {
308308
return;
309309
}
310310
} else {
311-
const fn = call.getFunction();
312-
if (!fn) {
313-
return message;
314-
}
315-
code = String(fn);
316-
identifier = `${code}${line}${column}`;
311+
return message;
317312
}
318313

319314
if (errorCache.has(identifier)) {
Collapse file

‎test/parallel/test-assert.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-assert.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ assert.throws(
921921
{
922922
code: 'ERR_ASSERTION',
923923
constructor: assert.AssertionError,
924-
message: 'The expression evaluated to a falsy value:\n\n assert(1 === 2)\n'
924+
message: 'false == true'
925925
}
926926
);
927927
assert.throws(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.