LibJS: Pass JS::Function around by reference more

This commit is contained in:
Andreas Kling 2020-04-29 13:43:57 +02:00
commit aaf35112a4
Notes: sideshowbarker 2024-07-19 07:11:39 +09:00
8 changed files with 22 additions and 22 deletions

View file

@ -359,7 +359,7 @@ Value Object::to_string() const
&& to_string_property.is_object()
&& to_string_property.as_object().is_function()) {
auto& to_string_function = static_cast<Function&>(to_string_property.as_object());
return const_cast<Object*>(this)->interpreter().call(&to_string_function, const_cast<Object*>(this));
return const_cast<Object*>(this)->interpreter().call(to_string_function, const_cast<Object*>(this));
}
return js_string(heap(), String::format("[object %s]", class_name()));
}