fix(node): remove use of non existing FunctionPrototypeApply primordial (#21986)

Fixes #21978
This commit is contained in:
Divy Srivastava 2024-01-19 22:31:46 +05:30 committed by GitHub
parent 59f419bf41
commit 47232f8a41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,8 +26,8 @@
import { primordials } from "ext:core/mod.js";
const {
ArrayPrototypePop,
ReflectApply,
Error,
FunctionPrototypeApply,
FunctionPrototypeBind,
ObjectDefineProperties,
ObjectGetOwnPropertyDescriptors,
@ -112,10 +112,10 @@ function callbackify<ResultT>(
throw new NodeInvalidArgTypeError("last");
}
const cb = (...args: unknown[]) => {
FunctionPrototypeApply(maybeCb, this, args);
ReflectApply(maybeCb, this, args);
};
PromisePrototypeThen(
FunctionPrototypeApply(this, args),
ReflectApply(this, args),
(ret: unknown) => {
nextTick(FunctionPrototypeBind(cb, this, null, ret));
},