mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibJS: Add ErrorType::ConstructorWithoutNew
...and use it in Proxy::call(), rather than having a specific error type just for that.
This commit is contained in:
parent
7fb299fe46
commit
1bff65c591
Notes:
sideshowbarker
2024-07-19 01:06:23 +09:00
Author: https://github.com/linusg
Commit: 1bff65c591
Pull-request: https://github.com/SerenityOS/serenity/pull/4304
3 changed files with 4 additions and 3 deletions
|
@ -50,7 +50,8 @@ ProxyConstructor::~ProxyConstructor()
|
|||
|
||||
Value ProxyConstructor::call()
|
||||
{
|
||||
vm().throw_exception<TypeError>(global_object(), ErrorType::ProxyCallWithNew);
|
||||
auto& vm = this->vm();
|
||||
vm.throw_exception<TypeError>(global_object(), ErrorType::ConstructorWithoutNew, vm.names.Proxy);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue