LibJS: Make IsHTMLDDA non-constructible
This commit is contained in:
parent
78bc84c2d8
commit
f53aa5bfbb
Notes:
sideshowbarker
2024-07-17 21:26:19 +09:00
Author: https://github.com/davidot Commit: https://github.com/SerenityOS/serenity/commit/f53aa5bfbb Pull-request: https://github.com/SerenityOS/serenity/pull/14930 Reviewed-by: https://github.com/linusg
2 changed files with 0 additions and 10 deletions
|
@ -29,12 +29,4 @@ ThrowCompletionOr<Value> IsHTMLDDA::call()
|
|||
return js_undefined();
|
||||
}
|
||||
|
||||
ThrowCompletionOr<Object*> IsHTMLDDA::construct(FunctionObject&)
|
||||
{
|
||||
// Not sure if we need to support construction, but ¯\_(ツ)_/¯
|
||||
auto& vm = this->vm();
|
||||
auto& global_object = this->global_object();
|
||||
return vm.throw_completion<TypeError>(global_object, ErrorType::NotAConstructor, "IsHTMLDDA");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,10 +18,8 @@ public:
|
|||
virtual ~IsHTMLDDA() override = default;
|
||||
|
||||
virtual ThrowCompletionOr<Value> call() override;
|
||||
virtual ThrowCompletionOr<Object*> construct(FunctionObject& new_target) override;
|
||||
|
||||
private:
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
virtual bool is_htmldda() const override { return true; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue