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:
parent
8333055c3d
commit
f48751a739
47 changed files with 78 additions and 107 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue