LibJS+LibWeb: Stop generating is_foo_wrapper() for JS DOM wrappers

This commit is contained in:
Andreas Kling 2021-01-01 18:06:38 +01:00
parent f48751a739
commit d2613403e0
Notes: sideshowbarker 2024-07-19 00:15:54 +09:00
3 changed files with 2 additions and 4 deletions

View file

@ -112,7 +112,6 @@ public:
virtual bool is_array() const { return false; }
virtual bool is_function() const { return false; }
virtual bool is_typed_array() const { return false; }
virtual bool is_node_wrapper() const { return false; }
virtual const char* class_name() const override { return "Object"; }
virtual void visit_edges(Cell::Visitor&) override;

View file

@ -80,7 +80,7 @@ JS_DEFINE_NATIVE_FUNCTION(RangePrototype::set_start)
if (vm.exception())
return {};
if (!arg0->is_node_wrapper()) {
if (!is<NodeWrapper>(arg0)) {
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Node");
return {};
}
@ -103,7 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(RangePrototype::set_end)
if (vm.exception())
return {};
if (!arg0->is_node_wrapper()) {
if (!is<NodeWrapper>(arg0)) {
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Node");
return {};
}

View file

@ -480,7 +480,6 @@ public:
generator.append(R"~~~(
private:
virtual bool is_@wrapper_class:snakecase@() const final { return true; }
)~~~");
for (auto& function : interface.functions) {