diff --git a/ext/node/polyfills/_util/_util_callbackify.ts b/ext/node/polyfills/_util/_util_callbackify.ts index 0ea4d08811..d6b54486d2 100644 --- a/ext/node/polyfills/_util/_util_callbackify.ts +++ b/ext/node/polyfills/_util/_util_callbackify.ts @@ -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( 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)); },