mirror of
https://github.com/RGBCube/serenity
synced 2025-06-20 18:12:06 +00:00
LibWeb: Return typed array and ArrayBuffer for BufferSource in IDL union
Previous this ignored typed arrays and ArrayBuffer, hitting the fallback JS -> C++ conversion case, typically stringifying them.
This commit is contained in:
parent
1f863de9aa
commit
1b6492d0fb
1 changed files with 1 additions and 1 deletions
|
@ -1123,7 +1123,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
|
||||||
for (auto& type : types) {
|
for (auto& type : types) {
|
||||||
if (type->name() == "BufferSource") {
|
if (type->name() == "BufferSource") {
|
||||||
union_generator.append(R"~~~(
|
union_generator.append(R"~~~(
|
||||||
if (is<JS::ArrayBuffer>(@js_name@@js_suffix@_object))
|
if (is<JS::TypedArrayBase>(@js_name@@js_suffix@_object) || is<JS::ArrayBuffer>(@js_name@@js_suffix@_object) || is<JS::DataView>(@js_name@@js_suffix@_object))
|
||||||
return JS::make_handle(@js_name@@js_suffix@_object);
|
return JS::make_handle(@js_name@@js_suffix@_object);
|
||||||
)~~~");
|
)~~~");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue