mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 00:29:09 -05:00
fix(node): don't print warning on process.dlopen.flags (#20124)
Closes https://github.com/denoland/deno/issues/20075
This commit is contained in:
parent
6b1a976181
commit
69387f0b0c
2 changed files with 7 additions and 6 deletions
|
@ -292,11 +292,10 @@ function _kill(pid: number, sig: number): number {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(bartlomieju): flags is currently not supported.
|
export function dlopen(module, filename, _flags) {
|
||||||
export function dlopen(module, filename, flags) {
|
// NOTE(bartlomieju): _flags is currently ignored, but we don't warn for it
|
||||||
if (typeof flags !== "undefined") {
|
// as it makes DX bad, even though it might not be needed:
|
||||||
warnNotImplemented("process.dlopen doesn't support 'flags' argument");
|
// https://github.com/denoland/deno/issues/20075
|
||||||
}
|
|
||||||
Module._extensions[".node"](module, filename);
|
Module._extensions[".node"](module, filename);
|
||||||
return module;
|
return module;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ export function loadTestLibrary() {
|
||||||
|
|
||||||
// Internal, used in ext/node
|
// Internal, used in ext/node
|
||||||
const module = {};
|
const module = {};
|
||||||
process.dlopen(module, specifier);
|
// Pass some flag, it should be ignored, but make sure it doesn't print
|
||||||
|
// warnings.
|
||||||
|
process.dlopen(module, specifier, 0);
|
||||||
return module.exports;
|
return module.exports;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue