mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 20:42:11 +02:00
LibJS: Convert create_data_property() to ThrowCompletionOr
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 03:07:33 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/fb443b3fb45 Pull-request: https://github.com/SerenityOS/serenity/pull/10327 Reviewed-by: https://github.com/IdanHo ✅
@@ -2880,7 +2880,7 @@ void @prototype_class@::initialize(JS::GlobalObject& global_object)
|
||||
|
||||
if (attribute.extended_attributes.contains("Unscopable")) {
|
||||
attribute_generator.append(R"~~~(
|
||||
unscopable_object->create_data_property("@attribute.name@", JS::Value(true));
|
||||
MUST(unscopable_object->create_data_property("@attribute.name@", JS::Value(true)));
|
||||
)~~~");
|
||||
}
|
||||
|
||||
@@ -2911,7 +2911,7 @@ void @prototype_class@::initialize(JS::GlobalObject& global_object)
|
||||
|
||||
if (function.extended_attributes.contains("Unscopable")) {
|
||||
function_generator.append(R"~~~(
|
||||
unscopable_object->create_data_property("@function.name@", JS::Value(true));
|
||||
MUST(unscopable_object->create_data_property("@function.name@", JS::Value(true)));
|
||||
)~~~");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user