mirror of
https://github.com/denoland/deno.git
synced 2025-10-03 15:44:36 +00:00
fix(node): remove use of non existing FunctionPrototypeApply
primordial (#21986)
Fixes #21978
This commit is contained in:
parent
59f419bf41
commit
47232f8a41
1 changed files with 3 additions and 3 deletions
|
@ -26,8 +26,8 @@
|
||||||
import { primordials } from "ext:core/mod.js";
|
import { primordials } from "ext:core/mod.js";
|
||||||
const {
|
const {
|
||||||
ArrayPrototypePop,
|
ArrayPrototypePop,
|
||||||
|
ReflectApply,
|
||||||
Error,
|
Error,
|
||||||
FunctionPrototypeApply,
|
|
||||||
FunctionPrototypeBind,
|
FunctionPrototypeBind,
|
||||||
ObjectDefineProperties,
|
ObjectDefineProperties,
|
||||||
ObjectGetOwnPropertyDescriptors,
|
ObjectGetOwnPropertyDescriptors,
|
||||||
|
@ -112,10 +112,10 @@ function callbackify<ResultT>(
|
||||||
throw new NodeInvalidArgTypeError("last");
|
throw new NodeInvalidArgTypeError("last");
|
||||||
}
|
}
|
||||||
const cb = (...args: unknown[]) => {
|
const cb = (...args: unknown[]) => {
|
||||||
FunctionPrototypeApply(maybeCb, this, args);
|
ReflectApply(maybeCb, this, args);
|
||||||
};
|
};
|
||||||
PromisePrototypeThen(
|
PromisePrototypeThen(
|
||||||
FunctionPrototypeApply(this, args),
|
ReflectApply(this, args),
|
||||||
(ret: unknown) => {
|
(ret: unknown) => {
|
||||||
nextTick(FunctionPrototypeBind(cb, this, null, ret));
|
nextTick(FunctionPrototypeBind(cb, this, null, ret));
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue