1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 12:15:07 +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

@ -106,7 +106,7 @@ LexicalEnvironment* ScriptFunction::create_environment()
environment->set_home_object(home_object());
environment->set_current_function(*this);
if (m_is_arrow_function) {
if (m_parent_scope->is_lexical_environment())
if (is<LexicalEnvironment>(m_parent_scope))
environment->set_new_target(static_cast<LexicalEnvironment*>(m_parent_scope)->new_target());
}
return environment;