mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibJS: Convert push_execution_context() to ThrowCompletionOr
This commit is contained in:
parent
7cdca08090
commit
57de5056b6
Notes:
sideshowbarker
2024-07-18 01:09:33 +09:00
Author: https://github.com/linusg
Commit: 57de5056b6
Pull-request: https://github.com/SerenityOS/serenity/pull/10917
Reviewed-by: https://github.com/IdanHo ✅
10 changed files with 20 additions and 21 deletions
|
@ -51,7 +51,7 @@ ThrowCompletionOr<Value> await(GlobalObject& global_object, Value value)
|
|||
result = vm.argument(0);
|
||||
|
||||
// c. Push asyncContext onto the execution context stack; asyncContext is now the running execution context.
|
||||
vm.push_execution_context(async_context, global_object);
|
||||
TRY(vm.push_execution_context(async_context, global_object));
|
||||
|
||||
// d. Resume the suspended evaluation of asyncContext using NormalCompletion(value) as the result of the operation that suspended it.
|
||||
// e. Assert: When we reach this step, asyncContext has already been removed from the execution context stack and prevContext is the currently running execution context.
|
||||
|
@ -75,7 +75,7 @@ ThrowCompletionOr<Value> await(GlobalObject& global_object, Value value)
|
|||
result = vm.argument(0);
|
||||
|
||||
// c. Push asyncContext onto the execution context stack; asyncContext is now the running execution context.
|
||||
vm.push_execution_context(async_context, global_object);
|
||||
TRY(vm.push_execution_context(async_context, global_object));
|
||||
|
||||
// d. Resume the suspended evaluation of asyncContext using ThrowCompletion(reason) as the result of the operation that suspended it.
|
||||
// e. Assert: When we reach this step, asyncContext has already been removed from the execution context stack and prevContext is the currently running execution context.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue