mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibJS: Add interpreter exception checks
This commit is contained in:
committed by
Andreas Kling
parent
f306ddb78b
commit
4e33fbdb67
Notes:
sideshowbarker
2024-07-19 05:45:16 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/4e33fbdb673 Pull-request: https://github.com/SerenityOS/serenity/pull/2522
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user