mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibJS: Add interpreter exception checks
This commit is contained in:
parent
f306ddb78b
commit
4e33fbdb67
11 changed files with 137 additions and 36 deletions
|
@ -74,7 +74,11 @@ inline void GlobalObject::add_constructor(const FlyString& property_name, Constr
|
|||
{
|
||||
constructor = heap().allocate<ConstructorType>();
|
||||
constructor->define_property("name", js_string(heap(), property_name), Attribute::Configurable);
|
||||
if (interpreter().exception())
|
||||
return;
|
||||
prototype.define_property("constructor", constructor, Attribute::Writable | Attribute::Configurable);
|
||||
if (interpreter().exception())
|
||||
return;
|
||||
define_property(property_name, constructor, Attribute::Writable | Attribute::Configurable);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue