summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-06-07 23:09:06 +0100
committerLinus Groh <mail@linusgroh.de>2021-06-07 23:09:06 +0100
commit7565bf059026685f8e13d9eda1eb1f1a6ef93983 (patch)
tree6d36e811932fed3c04ddfdb2719e38bb4140a473
parent3fdad563e2a845f356482d8917aba062cde30f81 (diff)
downloadserenity-7565bf059026685f8e13d9eda1eb1f1a6ef93983.zip
LibJS: Remove redundant exception checks
-rw-r--r--Userland/Libraries/LibJS/Runtime/Object.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Object.cpp b/Userland/Libraries/LibJS/Runtime/Object.cpp
index 2a21fd51f4..a40d3566f9 100644
--- a/Userland/Libraries/LibJS/Runtime/Object.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Object.cpp
@@ -429,26 +429,14 @@ Value Object::get_own_property_descriptor_object(const PropertyName& property_na
auto* descriptor_object = Object::create_empty(global_object());
if (descriptor.is_data_descriptor()) {
descriptor_object->define_property(vm.names.value, descriptor.value.value_or(js_undefined()));
- if (vm.exception())
- return {};
descriptor_object->define_property(vm.names.writable, Value(descriptor.attributes.is_writable()));
- if (vm.exception())
- return {};
} else {
VERIFY(descriptor.is_accessor_descriptor());
descriptor_object->define_property(vm.names.get, descriptor.getter ? Value(descriptor.getter) : js_undefined());
- if (vm.exception())
- return {};
descriptor_object->define_property(vm.names.set, descriptor.setter ? Value(descriptor.setter) : js_undefined());
- if (vm.exception())
- return {};
}
descriptor_object->define_property(vm.names.enumerable, Value(descriptor.attributes.is_enumerable()));
- if (vm.exception())
- return {};
descriptor_object->define_property(vm.names.configurable, Value(descriptor.attributes.is_configurable()));
- if (vm.exception())
- return {};
return descriptor_object;
}