mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
LibJS: Port Value::to_object() to NonnullGCPtr
This commit is contained in:
parent
e79f5b6e85
commit
f345f72b55
29 changed files with 264 additions and 263 deletions
|
@ -3842,10 +3842,10 @@ JS::ThrowCompletionOr<void> @prototype_class@::initialize(JS::Realm& realm)
|
|||
|
||||
static JS::ThrowCompletionOr<@fully_qualified_name@*> impl_from(JS::VM& vm)
|
||||
{
|
||||
auto* this_object = TRY(vm.this_value().to_object(vm));
|
||||
if (!is<@fully_qualified_name@>(this_object))
|
||||
auto this_object = TRY(vm.this_value().to_object(vm));
|
||||
if (!is<@fully_qualified_name@>(*this_object))
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "@name@");
|
||||
return static_cast<@fully_qualified_name@*>(this_object);
|
||||
return static_cast<@fully_qualified_name@*>(this_object.ptr());
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::next)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue