mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:07:35 +00:00
LibJS: Fix incorrect is_function()
check in NewPromiseCapability
I introduced this copy-paste mistake in c21255d
.
Gets rid of 7 assertion failures on test262.
This commit is contained in:
parent
1550e7c421
commit
18c735429f
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ ThrowCompletionOr<NonnullGCPtr<PromiseCapability>> new_promise_capability(VM& vm
|
||||||
return vm.throw_completion<TypeError>(ErrorType::NotAFunction, "Promise capability resolve value");
|
return vm.throw_completion<TypeError>(ErrorType::NotAFunction, "Promise capability resolve value");
|
||||||
|
|
||||||
// 8. If IsCallable(resolvingFunctions.[[Reject]]) is false, throw a TypeError exception.
|
// 8. If IsCallable(resolvingFunctions.[[Reject]]) is false, throw a TypeError exception.
|
||||||
if (!resolving_functions->resolve.is_function())
|
if (!resolving_functions->reject.is_function())
|
||||||
return vm.throw_completion<TypeError>(ErrorType::NotAFunction, "Promise capability reject value");
|
return vm.throw_completion<TypeError>(ErrorType::NotAFunction, "Promise capability reject value");
|
||||||
|
|
||||||
// 9. Return the PromiseCapability Record { [[Promise]]: promise, [[Resolve]]: resolvingFunctions.[[Resolve]], [[Reject]]: resolvingFunctions.[[Reject]] }.
|
// 9. Return the PromiseCapability Record { [[Promise]]: promise, [[Resolve]]: resolvingFunctions.[[Resolve]], [[Reject]]: resolvingFunctions.[[Reject]] }.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue