mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 10:18:38 +09:00
No issue - Throw error when resolving or rejecting promise returned by async function with testing function
Based-on: m-c 1418106
This commit is contained in:
parent
531906eb87
commit
0216108195
3 changed files with 20 additions and 0 deletions
|
|
@ -2577,6 +2577,13 @@ js::CreatePromiseObjectForAsync(JSContext* cx, HandleValue generatorVal)
|
|||
return promise;
|
||||
}
|
||||
|
||||
bool
|
||||
js::IsPromiseForAsync(JSObject* promise)
|
||||
{
|
||||
return promise->is<PromiseObject>() &&
|
||||
PromiseHasAnyFlag(promise->as<PromiseObject>(), PROMISE_FLAG_ASYNC);
|
||||
}
|
||||
|
||||
// ES 2018 draft 25.5.5.2 steps 3.f, 3.g.
|
||||
MOZ_MUST_USE bool
|
||||
js::AsyncFunctionThrown(JSContext* cx, Handle<PromiseObject*> resultPromise)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue