summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2023-04-20 19:08:30 +0100
committerAndreas Kling <kling@serenityos.org>2023-04-21 07:59:50 +0200
commit1b6492d0fbacf2a99b5e8a81ccdf6de202189ba3 (patch)
tree09d4a2eb85f9b7f77bad3e9bfc5c470d3c8c0308 /Meta
parent1f863de9aa6e80ba23a95ac503f64b42fb4afb7d (diff)
downloadserenity-1b6492d0fbacf2a99b5e8a81ccdf6de202189ba3.zip
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.
Diffstat (limited to 'Meta')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp
index a6e2f4769c..c7c0ff02b0 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp
@@ -1123,7 +1123,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
for (auto& type : types) {
if (type->name() == "BufferSource") {
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);
)~~~");
}