fix(napi): return node globalThis from napi_get_global (#17613)

Fixes https://github.com/denoland/deno/issues/17587
This commit is contained in:
Divy Srivastava 2023-02-01 06:41:04 -08:00 committed by GitHub
parent 1b46b2f0e4
commit 524bccdf6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 68 additions and 6 deletions

View file

@ -17,5 +17,9 @@ const [libPrefix, libSuffix] = {
export function loadTestLibrary() {
const specifier = `${targetDir}/${libPrefix}test_napi.${libSuffix}`;
return Deno[Deno.internal].core.ops.op_napi_open(specifier); // Internal, used in ext/node
// Internal, used in ext/node
return Deno[Deno.internal].core.ops.op_napi_open(specifier, {
Buffer: {},
});
}