Fix the CanvasPath::CreateNew signature to avoid unnecessary Dart API::NewError calls (flutter/engine#32791)
This commit is contained in:
@@ -24,7 +24,7 @@ class CanvasPath : public RefCountedDartWrappable<CanvasPath> {
|
||||
|
||||
public:
|
||||
~CanvasPath() override;
|
||||
static fml::RefPtr<CanvasPath> CreateNew(Dart_Handle path_handle) {
|
||||
static fml::RefPtr<CanvasPath> CreateNew() {
|
||||
return fml::MakeRefCounted<CanvasPath>();
|
||||
}
|
||||
|
||||
|
||||
@@ -560,7 +560,9 @@ struct DartConverter<Dart_Handle> {
|
||||
static NativeType FromArguments(Dart_NativeArguments args,
|
||||
int index,
|
||||
Dart_Handle& exception) {
|
||||
return Dart_GetNativeArgument(args, index);
|
||||
Dart_Handle result = Dart_GetNativeArgument(args, index);
|
||||
TONIC_DCHECK(!Dart_IsError(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
static NativeType FromFfi(FfiType val) { return val; }
|
||||
|
||||
Reference in New Issue
Block a user