mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:18:13 +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
|
@ -135,7 +135,7 @@ static RegExpObject* regexp_object_from(VM& vm, GlobalObject& global_object)
|
|||
auto* this_object = vm.this_value(global_object).to_object(global_object);
|
||||
if (!this_object)
|
||||
return nullptr;
|
||||
if (!this_object->is_regexp_object()) {
|
||||
if (!is<RegExpObject>(this_object)) {
|
||||
vm.throw_exception<TypeError>(global_object, ErrorType::NotA, "RegExp");
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue