Release acquired typed data before calling Dart_SetReturnValue. (flutter/engine#17729)
This commit is contained in:
committed by
GitHub
parent
05aebc8032
commit
2eb118495b
@@ -69,7 +69,9 @@ template <Dart_TypedData_Type kTypeName, typename ElemType>
|
||||
void DartConverter<TypedList<kTypeName, ElemType>>::SetReturnValue(
|
||||
Dart_NativeArguments args,
|
||||
TypedList<kTypeName, ElemType> val) {
|
||||
Dart_SetReturnValue(args, val.dart_handle());
|
||||
Dart_Handle result = val.dart_handle();
|
||||
val.Release(); // Must release acquired typed data before calling Dart API.
|
||||
Dart_SetReturnValue(args, result);
|
||||
}
|
||||
|
||||
template <Dart_TypedData_Type kTypeName, typename ElemType>
|
||||
|
||||
Reference in New Issue
Block a user