mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +00:00
LibJS: Use ErrorType::NotAnObjectOfType instead of NotA
This commit is contained in:
parent
9def17d4cb
commit
470262c8ab
Notes:
sideshowbarker
2024-07-18 04:14:25 +09:00
Author: https://github.com/trflynn89
Commit: 470262c8ab
Pull-request: https://github.com/SerenityOS/serenity/pull/9975
Reviewed-by: https://github.com/linusg ✅
40 changed files with 67 additions and 67 deletions
|
@ -38,7 +38,7 @@ TESTJS_GLOBAL_FUNCTION(get_weak_set_size, getWeakSetSize)
|
|||
if (!object)
|
||||
return {};
|
||||
if (!is<JS::WeakSet>(object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WeakSet");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "WeakSet");
|
||||
return {};
|
||||
}
|
||||
auto* weak_set = static_cast<JS::WeakSet*>(object);
|
||||
|
@ -51,7 +51,7 @@ TESTJS_GLOBAL_FUNCTION(get_weak_map_size, getWeakMapSize)
|
|||
if (!object)
|
||||
return {};
|
||||
if (!is<JS::WeakMap>(object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WeakMap");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "WeakMap");
|
||||
return {};
|
||||
}
|
||||
auto* weak_map = static_cast<JS::WeakMap*>(object);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue