mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 09:35:15 +00:00
LibJS: Convert get_this_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
@@ -256,9 +256,7 @@ ThrowCompletionOr<Object*> ECMAScriptFunctionObject::internal_construct(MarkedVa
|
||||
}
|
||||
|
||||
// 12. Return ? constructorEnv.GetThisBinding().
|
||||
auto this_binding = constructor_env->get_this_binding(global_object);
|
||||
if (auto* exception = vm.exception())
|
||||
return throw_completion(exception->value());
|
||||
auto this_binding = TRY(constructor_env->get_this_binding(global_object));
|
||||
return &this_binding.as_object();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user