mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibJS: Convert push_execution_context() to ThrowCompletionOr
This commit is contained in:
parent
7cdca08090
commit
57de5056b6
10 changed files with 20 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue