mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-30 19:28:40 +09:00
1323324 - Part 1: Make Promise::unforgeable{Resolve,Reject} spec-compliant.
This commit is contained in:
parent
ff46e0c58c
commit
146dbe7bee
2 changed files with 44 additions and 60 deletions
|
|
@ -4884,7 +4884,7 @@ JS::CallOriginalPromiseResolve(JSContext* cx, JS::HandleValue resolutionValue)
|
|||
assertSameCompartment(cx, resolutionValue);
|
||||
|
||||
RootedObject promise(cx, PromiseObject::unforgeableResolve(cx, resolutionValue));
|
||||
MOZ_ASSERT_IF(promise, promise->is<PromiseObject>());
|
||||
MOZ_ASSERT_IF(promise, CheckedUnwrap(promise)->is<PromiseObject>());
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
|
@ -4896,7 +4896,7 @@ JS::CallOriginalPromiseReject(JSContext* cx, JS::HandleValue rejectionValue)
|
|||
assertSameCompartment(cx, rejectionValue);
|
||||
|
||||
RootedObject promise(cx, PromiseObject::unforgeableReject(cx, rejectionValue));
|
||||
MOZ_ASSERT_IF(promise, promise->is<PromiseObject>());
|
||||
MOZ_ASSERT_IF(promise, CheckedUnwrap(promise)->is<PromiseObject>());
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue