mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 14:45:07 +00:00
LibJS: Convert to_u16() to ThrowCompletionOr
This commit is contained in:
parent
627b1205ce
commit
7bbb92dfe9
5 changed files with 7 additions and 13 deletions
|
@ -1121,9 +1121,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
|
|||
)~~~");
|
||||
} else if (parameter.type->name == "unsigned short") {
|
||||
scoped_generator.append(R"~~~(
|
||||
auto @cpp_name@ = @js_name@@js_suffix@.to_u16(global_object);
|
||||
if (vm.exception())
|
||||
@return_statement@
|
||||
auto @cpp_name@ = TRY_OR_DISCARD(@js_name@@js_suffix@.to_u16(global_object));
|
||||
)~~~");
|
||||
} else if (parameter.type->name == "long") {
|
||||
scoped_generator.append(R"~~~(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue