mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
LibWeb: Replace IDL 'void' return type with 'undefined'
From the Web IDL spec: https://heycam.github.io/webidl/#idl-undefined [...] undefined constant values in IDL are represented with the `undefined` token. [...] Note: This value was previously spelled `void`, and more limited in how it was allowed to be used.
This commit is contained in:
parent
c1dfb2d883
commit
5d77a19af5
6 changed files with 23 additions and 23 deletions
|
@ -741,7 +741,7 @@ static @fully_qualified_name@* impl_from(JS::VM& vm, JS::GlobalObject& global_ob
|
|||
auto scoped_generator = generator.fork();
|
||||
scoped_generator.set("return_type", return_type.name);
|
||||
|
||||
if (return_type.name == "void") {
|
||||
if (return_type.name == "undefined") {
|
||||
scoped_generator.append(R"~~~(
|
||||
return JS::js_undefined();
|
||||
)~~~");
|
||||
|
@ -918,7 +918,7 @@ JS_DEFINE_NATIVE_FUNCTION(@wrapper_class@::@function.name:snakecase@)
|
|||
|
||||
function_generator.set(".arguments", arguments_builder.string_view());
|
||||
|
||||
if (function.return_type.name != "void") {
|
||||
if (function.return_type.name != "undefined") {
|
||||
function_generator.append(R"~~~(
|
||||
auto retval = impl->@function.name:snakecase@(@.arguments@);
|
||||
)~~~");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue