Commit graph

6 commits

Author SHA1 Message Date
Linus Groh
1c05d39abc LibJS: Also throw exception when returning throw completion from await
...for now - the reason being that the AST breaks 'completion bubbling'
and returns a plain Value, and code at the call site relies on the VM
having an exception set when converting the plain value back into a
completion.

Fixes #11301.
2021-12-28 14:48:32 +01:00
Ali Mohammad Pur
ccf713bf23 LibJS: Spin the event loop while waiting for async completion in await 2021-11-28 13:28:01 +00:00
Linus Groh
57de5056b6 LibJS: Convert push_execution_context() to ThrowCompletionOr 2021-11-14 16:14:38 +00:00
Linus Groh
68ac13a192 LibJS: Add a Completion(ThrowCompletionOr<Value> const&) constructor 2021-11-14 15:27:46 +00:00
Idan Horowitz
a445deb205 LibJS: Remove left-over debug assertion from the Await AO 2021-11-10 18:11:26 +00:00
Idan Horowitz
46dabf02ec LibJS: Add support for await expressions 2021-11-10 08:48:27 +00:00