Skip to content

Commit 6a87e3a

Browse files
committed
util: add internal assignFunctionName() function
nodejs/node#57916
1 parent 061dcc5 commit 6a87e3a

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

lib/node/asar-fs-wrapper.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ const {
5454
getDirent
5555
} = __non_webpack_require__('internal/fs/utils');
5656

57+
const {
58+
assignFunctionName
59+
} = __non_webpack_require__('internal/util');
60+
5761
const {
5862
validateBoolean,
5963
validateFunction
@@ -235,7 +239,10 @@ const overrideAPI = function (module: Record<string, any>, name: string, pathArg
235239
};
236240

237241
if (old[util.promisify.custom]) {
238-
module[name][util.promisify.custom] = makePromiseFunction(old[util.promisify.custom], pathArgumentIndex);
242+
module[name][util.promisify.custom] = assignFunctionName(
243+
name,
244+
makePromiseFunction(old[util.promisify.custom], pathArgumentIndex)
245+
);
239246
}
240247

241248
if (module.promises && module.promises[name]) {
@@ -1238,7 +1245,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
12381245
// command as a single path to an archive.
12391246
const { exec, execSync } = childProcess;
12401247
childProcess.exec = invokeWithNoAsar(exec);
1241-
childProcess.exec[util.promisify.custom] = invokeWithNoAsar(exec[util.promisify.custom]);
1248+
childProcess.exec[util.promisify.custom] = assignFunctionName('exec', invokeWithNoAsar(exec[util.promisify.custom]));
12421249
childProcess.execSync = invokeWithNoAsar(execSync);
12431250

12441251
overrideAPI(childProcess, 'execFile');

patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ index 6032bbd10f41da7bae44828a8e908c1bec0ea0b6..8597f1d6972ea111ea7e53a3199c1b4e
550550
#include "util-inl.h"
551551

552552
+#if HAVE_OPENSSL
553-
+#include <openssl/base.h>
553+
+#include <openssl/base.h>
554554
+#endif
555555
+
556556
namespace node {

0 commit comments

Comments
 (0)