mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
LibJS: Remove redundant exception checks from initialize_constructor()
define_direct_property() simply wraps storage_set(), which cannot throw.
This commit is contained in:
parent
57de5056b6
commit
27d84bebd4
1 changed files with 1 additions and 6 deletions
|
@ -138,13 +138,8 @@ inline void GlobalObject::initialize_constructor(PropertyKey const& property_nam
|
|||
auto& vm = this->vm();
|
||||
constructor = heap().allocate<ConstructorType>(*this, *this);
|
||||
constructor->define_direct_property(vm.names.name, js_string(heap(), property_name.as_string()), Attribute::Configurable);
|
||||
if (vm.exception())
|
||||
return;
|
||||
if (prototype) {
|
||||
if (prototype)
|
||||
prototype->define_direct_property(vm.names.constructor, constructor, Attribute::Writable | Attribute::Configurable);
|
||||
if (vm.exception())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename ConstructorType>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue