mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibJS: Convert Object::get() to ThrowCompletionOr
To no one's surprise, this patch is pretty big - this is possibly the most used AO of all of them. Definitely worth it though.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 03:07:41 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/b7e5f08e561 Pull-request: https://github.com/SerenityOS/serenity/pull/10327 Reviewed-by: https://github.com/IdanHo ✅
@@ -36,8 +36,8 @@ JS::Value WebAssemblyMemoryConstructor::construct(FunctionObject&)
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
auto initial_value = descriptor->get_without_side_effects("initial");
|
||||
auto maximum_value = descriptor->get_without_side_effects("maximum");
|
||||
auto initial_value = TRY_OR_DISCARD(descriptor->get("initial"));
|
||||
auto maximum_value = TRY_OR_DISCARD(descriptor->get("maximum"));
|
||||
|
||||
if (initial_value.is_empty()) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "Number");
|
||||
|
||||
Reference in New Issue
Block a user