mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibJS: Convert standalone construct() to NonnullGCPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 20:19:08 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/bd40464195 Pull-request: https://github.com/SerenityOS/serenity/pull/16498 Reviewed-by: https://github.com/trflynn89 ✅
@@ -679,7 +679,7 @@ ThrowCompletionOr<void> SuperCall::execute_impl(Bytecode::Interpreter& interpret
|
||||
return vm.throw_completion<TypeError>(ErrorType::NotAConstructor, "Super constructor");
|
||||
|
||||
// 6. Let result be ? Construct(func, argList, newTarget).
|
||||
auto* result = TRY(construct(vm, static_cast<FunctionObject&>(*func), move(arg_list), &new_target.as_function()));
|
||||
auto result = TRY(construct(vm, static_cast<FunctionObject&>(*func), move(arg_list), &new_target.as_function()));
|
||||
|
||||
// 7. Let thisER be GetThisEnvironment().
|
||||
auto& this_environment = verify_cast<FunctionEnvironment>(get_this_environment(vm));
|
||||
|
||||
Reference in New Issue
Block a user