mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-29 04:39:10 +00:00
IDLGenerators: Correct the parameter type check for setlike methods
This commit is contained in:
parent
f2dd66e039
commit
9e1bbe7edd
Notes:
github-actions[bot]
2025-07-04 17:12:28 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9e1bbe7edd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5302
Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 3 additions and 3 deletions
|
@ -4597,7 +4597,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::has)
|
|||
GC::Ref<JS::Set> set = impl->set_entries();
|
||||
|
||||
auto value_arg = vm.argument(0);
|
||||
if (!value_arg.is_object() && !is<@value_type@>(value_arg.as_object())) {
|
||||
if (!value_arg.is_object() || !is<@value_type@>(value_arg.as_object())) {
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "@value_type@");
|
||||
}
|
||||
|
||||
|
@ -4619,7 +4619,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::add)
|
|||
GC::Ref<JS::Set> set = impl->set_entries();
|
||||
|
||||
auto value_arg = vm.argument(0);
|
||||
if (!value_arg.is_object() && !is<@value_type@>(value_arg.as_object())) {
|
||||
if (!value_arg.is_object() || !is<@value_type@>(value_arg.as_object())) {
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "@value_type@");
|
||||
}
|
||||
|
||||
|
@ -4643,7 +4643,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::delete_)
|
|||
GC::Ref<JS::Set> set = impl->set_entries();
|
||||
|
||||
auto value_arg = vm.argument(0);
|
||||
if (!value_arg.is_object() && !is<@value_type@>(value_arg.as_object())) {
|
||||
if (!value_arg.is_object() || !is<@value_type@>(value_arg.as_object())) {
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "@value_type@");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue