mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibJS+LibWeb: Stop generating is_foo_wrapper() for JS DOM wrappers
This commit is contained in:
parent
f48751a739
commit
d2613403e0
Notes:
sideshowbarker
2024-07-19 00:15:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d2613403e06
3 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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 {};
|
||||
}
|
||||
|
|
|
@ -480,7 +480,6 @@ public:
|
|||
|
||||
generator.append(R"~~~(
|
||||
private:
|
||||
virtual bool is_@wrapper_class:snakecase@() const final { return true; }
|
||||
)~~~");
|
||||
|
||||
for (auto& function : interface.functions) {
|
||||
|
|
Loading…
Reference in a new issue