mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:48:12 +00:00
LibJS: Use RTTI for inheritance checks
This replaces the hand-rolled string-based inheritance check tech.
This commit is contained in:
parent
fc86717f43
commit
8333055c3d
3 changed files with 7 additions and 10 deletions
|
@ -419,7 +419,7 @@ JS_DEFINE_NATIVE_FUNCTION(WorkbookObject::sheet)
|
|||
if (!this_object)
|
||||
return {};
|
||||
|
||||
if (!this_object->inherits("WorkbookObject")) {
|
||||
if (!is<WorkbookObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WorkbookObject");
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue