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:
Linus Groh
2021-10-02 23:52:27 +01:00
parent 9b6c09e2c4
commit b7e5f08e56
Notes: sideshowbarker 2024-07-18 03:07:41 +09:00
61 changed files with 326 additions and 686 deletions

View File

@@ -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");