1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:37:43 +00:00

LibJS: Remove hand-rolled Object is_foo() helpers in favor of RTTI

This commit is contained in:
Andreas Kling 2021-01-01 17:46:39 +01:00
parent 8333055c3d
commit f48751a739
47 changed files with 78 additions and 107 deletions

View file

@ -50,7 +50,7 @@ Function::~Function()
BoundFunction* Function::bind(Value bound_this_value, Vector<Value> arguments)
{
auto& vm = this->vm();
Function& target_function = is_bound_function() ? static_cast<BoundFunction&>(*this).target_function() : *this;
Function& target_function = is<BoundFunction>(*this) ? static_cast<BoundFunction&>(*this).target_function() : *this;
auto bound_this_object = [&vm, bound_this_value, this]() -> Value {
if (!m_bound_this.is_empty())