mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
parent
d5def1cad0
commit
8ba2b5f36f
Notes:
sideshowbarker
2024-07-18 20:24:34 +09:00
Author: https://github.com/alimpfard
Commit: 8ba2b5f36f
Pull-request: https://github.com/SerenityOS/serenity/pull/6293
Issue: https://github.com/SerenityOS/serenity/issues/6075
Reviewed-by: https://github.com/Lubrsi ✅
Reviewed-by: https://github.com/linusg
2 changed files with 43 additions and 8 deletions
|
@ -1514,9 +1514,11 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::@function.name:snakecase@)
|
|||
function_generator.set(".arguments", arguments_builder.string_view());
|
||||
|
||||
function_generator.append(R"~~~(
|
||||
auto retval = throw_dom_exception_if_needed(vm, global_object, [&] { return impl->@function.cpp_name@(@.arguments@); });
|
||||
if (should_return_empty(retval))
|
||||
auto result = throw_dom_exception_if_needed(vm, global_object, [&] { return impl->@function.cpp_name@(@.arguments@); });
|
||||
if (should_return_empty(result))
|
||||
return JS::Value();
|
||||
|
||||
[[maybe_unused]] auto retval = result.release_value();
|
||||
)~~~");
|
||||
|
||||
generate_return_statement(function.return_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue