mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +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
Notes:
sideshowbarker
2024-07-17 09:56:35 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/1b6492d0fb Pull-request: https://github.com/SerenityOS/serenity/pull/18445
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) {
|
||||
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);
|
||||
)~~~");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue