1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibJS: Convert push_execution_context() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-11-14 12:20:49 +00:00
parent 7cdca08090
commit 57de5056b6
10 changed files with 20 additions and 21 deletions

View file

@ -104,7 +104,7 @@ ThrowCompletionOr<Value> NativeFunction::internal_call(Value this_argument, Mark
// </8.> --------------------------------------------------------------------------
// 9. Push calleeContext onto the execution context stack; calleeContext is now the running execution context.
vm.push_execution_context(callee_context, global_object);
TRY(vm.push_execution_context(callee_context, global_object));
// 10. Let result be the Completion Record that is the result of evaluating F in a manner that conforms to the specification of F. thisArgument is the this value, argumentsList provides the named parameters, and the NewTarget value is undefined.
auto result = call();
@ -168,7 +168,7 @@ ThrowCompletionOr<Object*> NativeFunction::internal_construct(MarkedValueList ar
// </8.> --------------------------------------------------------------------------
// 9. Push calleeContext onto the execution context stack; calleeContext is now the running execution context.
vm.push_execution_context(callee_context, global_object);
TRY(vm.push_execution_context(callee_context, global_object));
// 10. Let result be the Completion Record that is the result of evaluating F in a manner that conforms to the specification of F. The this value is uninitialized, argumentsList provides the named parameters, and newTarget provides the NewTarget value.
auto result = construct(new_target);