mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
LibJS: Add interpreter exception checks
This commit is contained in:
parent
f306ddb78b
commit
4e33fbdb67
Notes:
sideshowbarker
2024-07-19 05:45:16 +09:00
Author: https://github.com/mattco98
Commit: 4e33fbdb67
Pull-request: https://github.com/SerenityOS/serenity/pull/2522
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