From fa11ee6e2af5eb7a615fb072e2c9a92fe0c24e44 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 19 Oct 2020 19:42:01 -0700 Subject: [PATCH] Fix native constructor of list of zircon handles and remove unused list factory specializations. (#21980) --- lib/ui/text/text_box.h | 14 -------------- .../fuchsia/dart-pkg/zircon/sdk_ext/system.cc | 3 ++- third_party/tonic/dart_wrappable.h | 12 ------------ 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/lib/ui/text/text_box.h b/lib/ui/text/text_box.h index c3eea00aa8999..27f60670f232f 100644 --- a/lib/ui/text/text_box.h +++ b/lib/ui/text/text_box.h @@ -25,18 +25,4 @@ struct TextBox { } // namespace flutter -namespace tonic { - -template <> -struct DartConverter { - static Dart_Handle ToDart(const flutter::TextBox& val); -}; - -template <> -struct DartListFactory { - static Dart_Handle NewList(intptr_t length); -}; - -} // namespace tonic - #endif // FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_ diff --git a/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc b/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc index 1c3d642a2c987..9482c453d50ca 100644 --- a/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc +++ b/shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc @@ -98,7 +98,8 @@ Dart_Handle MakeHandleList(const std::vector& in_handles) { tonic::DartClassLibrary& class_library = tonic::DartState::Current()->class_library(); Dart_Handle handle_type = class_library.GetClass("zircon", "Handle"); - Dart_Handle list = Dart_NewListOfType(handle_type, in_handles.size()); + Dart_Handle list = Dart_NewListOfTypeFilled( + handle_type, Handle::CreateInvalid(), in_handles.size()); if (Dart_IsError(list)) return list; for (size_t i = 0; i < in_handles.size(); i++) { diff --git a/third_party/tonic/dart_wrappable.h b/third_party/tonic/dart_wrappable.h index 49b0a2c40baf3..a036abb854e7c 100644 --- a/third_party/tonic/dart_wrappable.h +++ b/third_party/tonic/dart_wrappable.h @@ -166,18 +166,6 @@ struct DartConverter> { } }; -template