From e11e2c11288b6a3f9f9bb3dcfb9bb459a75e048c Mon Sep 17 00:00:00 2001 From: Slava Egorov Date: Wed, 8 Oct 2025 17:42:39 +0200 Subject: [PATCH] Configure FfiNative resolver on dart:io (#176621) This is needed by file watching implementation after dart-lang/sdk@ed6bab847ba2a94a295a3c959157040f6c917fde Ideally we should actually move this whole code into `io_natives.{h,cc}` on the Dart runtime side to avoid duplication. --- engine/src/flutter/lib/io/dart_io.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/flutter/lib/io/dart_io.cc b/engine/src/flutter/lib/io/dart_io.cc index 75bb37e8981..9c8b90dcf4a 100644 --- a/engine/src/flutter/lib/io/dart_io.cc +++ b/engine/src/flutter/lib/io/dart_io.cc @@ -17,10 +17,13 @@ namespace flutter { void DartIO::InitForIsolate(bool may_insecurely_connect_to_all_domains, const std::string& domain_network_policy) { + // TODO(https://dartbug.com/61694): move this code into dart_io_api.h Dart_Handle io_lib = Dart_LookupLibrary(ToDart("dart:io")); Dart_Handle result = Dart_SetNativeResolver(io_lib, dart::bin::LookupIONative, dart::bin::LookupIONativeSymbol); FML_CHECK(!CheckAndHandleError(result)); + result = Dart_SetFfiNativeResolver(io_lib, dart::bin::LookupIOFfiNative); + FML_CHECK(!CheckAndHandleError(result)); Dart_Handle ui_lib = Dart_LookupLibrary(ToDart("dart:ui")); Dart_Handle dart_validate_args[1];