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 f21ddb2

Browse filesBrowse files
danbevtargos
authored andcommitted
crypto: move _impl call out of handleError funct
This commit moves the _impl function call out of the handleError function, which now only takes in an object as its parameter. PR-URL: #28318 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 558e9cf commit f21ddb2
Copy full SHA for f21ddb2

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Collapse file

‎lib/internal/crypto/keygen.js‎

Copy file name to clipboardExpand all lines: lib/internal/crypto/keygen.js
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function generateKeyPair(type, options, callback) {
6060
callback.call(wrap, null, pubkey, privkey);
6161
};
6262

63-
handleError(impl, wrap);
63+
handleError(impl(wrap));
6464
}
6565

6666
Object.defineProperty(generateKeyPair, customPromisifyArgs, {
@@ -70,11 +70,10 @@ Object.defineProperty(generateKeyPair, customPromisifyArgs, {
7070

7171
function generateKeyPairSync(type, options) {
7272
const impl = check(type, options);
73-
return handleError(impl);
73+
return handleError(impl());
7474
}
7575

76-
function handleError(impl, wrap) {
77-
const ret = impl(wrap);
76+
function handleError(ret) {
7877
if (ret === undefined)
7978
return; // async
8079

0 commit comments

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