mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:57:46 +00:00
LibWeb: Stop casting unsigned long IDL return values to i32
These values may not fit into an i32.
This commit is contained in:
parent
44601a8e74
commit
824cf570d3
1 changed files with 5 additions and 1 deletions
|
@ -1310,9 +1310,13 @@ static void generate_wrap_statement(SourceGenerator& generator, String const& va
|
|||
scoped_generator.append(R"~~~(
|
||||
@result_expression@ JS::Value(@value@);
|
||||
)~~~");
|
||||
} else if (type.name == "short" || type.name == "unsigned short" || type.name == "long" || type.name == "unsigned long") {
|
||||
} else if (type.name == "short" || type.name == "long" || type.name == "unsigned short") {
|
||||
scoped_generator.append(R"~~~(
|
||||
@result_expression@ JS::Value((i32)@value@);
|
||||
)~~~");
|
||||
} else if (type.name == "unsigned long") {
|
||||
scoped_generator.append(R"~~~(
|
||||
@result_expression@ JS::Value((u32)@value@);
|
||||
)~~~");
|
||||
} else if (type.name == "Location" || type.name == "Promise" || type.name == "Uint8Array" || type.name == "Uint8ClampedArray" || type.name == "any") {
|
||||
scoped_generator.append(R"~~~(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue