mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
BindingsGenerator: Allow stringifier to return DOMException if needed
This commit is contained in:
parent
e8bd067ce5
commit
511ce240f2
Notes:
sideshowbarker
2024-07-16 23:59:28 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/511ce240f2 Pull-request: https://github.com/SerenityOS/serenity/pull/17577 Reviewed-by: https://github.com/AtkinsSJ
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
|
||||
* Copyright (c) 2022, Ali Mohammad Pur <mpfard@serenityos.org>
|
||||
* Copyright (c) 2023, Kenneth Myhra <kennethmyhra@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -2794,7 +2795,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::to_string)
|
|||
)~~~");
|
||||
if (interface.stringifier_attribute.has_value()) {
|
||||
stringifier_generator.append(R"~~~(
|
||||
auto retval = impl->@attribute.cpp_getter_name@();
|
||||
auto retval = TRY(throw_dom_exception_if_needed(vm, [&] { return impl->@attribute.cpp_getter_name@(); }));
|
||||
)~~~");
|
||||
} else {
|
||||
stringifier_generator.append(R"~~~(
|
||||
|
|
Loading…
Reference in a new issue