Skip to content

Commit fa11ee6

Browse files
authored
Fix native constructor of list of zircon handles and remove unused list factory specializations. (flutter#21980)
1 parent 0747f2f commit fa11ee6

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

lib/ui/text/text_box.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,4 @@ struct TextBox {
2525

2626
} // namespace flutter
2727

28-
namespace tonic {
29-
30-
template <>
31-
struct DartConverter<flutter::TextBox> {
32-
static Dart_Handle ToDart(const flutter::TextBox& val);
33-
};
34-
35-
template <>
36-
struct DartListFactory<flutter::TextBox> {
37-
static Dart_Handle NewList(intptr_t length);
38-
};
39-
40-
} // namespace tonic
41-
4228
#endif // FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_

shell/platform/fuchsia/dart-pkg/zircon/sdk_ext/system.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ Dart_Handle MakeHandleList(const std::vector<zx_handle_t>& in_handles) {
9898
tonic::DartClassLibrary& class_library =
9999
tonic::DartState::Current()->class_library();
100100
Dart_Handle handle_type = class_library.GetClass("zircon", "Handle");
101-
Dart_Handle list = Dart_NewListOfType(handle_type, in_handles.size());
101+
Dart_Handle list = Dart_NewListOfTypeFilled(
102+
handle_type, Handle::CreateInvalid(), in_handles.size());
102103
if (Dart_IsError(list))
103104
return list;
104105
for (size_t i = 0; i < in_handles.size(); i++) {

third_party/tonic/dart_wrappable.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,6 @@ struct DartConverter<PTR<T>> {
166166
}
167167
};
168168

169-
template <template <typename T> class PTR, typename T>
170-
struct DartListFactory<
171-
PTR<T>,
172-
typename std::enable_if<
173-
std::is_convertible<T*, const DartWrappable*>::value>::type> {
174-
static Dart_Handle NewList(intptr_t length) {
175-
Dart_PersistentHandle type = T::GetDartType(DartState::Current());
176-
TONIC_DCHECK(!LogIfError(type));
177-
return Dart_NewListOfType(Dart_HandleFromPersistent(type), length);
178-
}
179-
};
180-
181169
template <typename T>
182170
inline T* GetReceiver(Dart_NativeArguments args) {
183171
intptr_t receiver;

0 commit comments

Comments
 (0)