Skip to content

Commit e11e2c1

Browse files
authored
Configure FfiNative resolver on dart:io (flutter#176621)
This is needed by file watching implementation after dart-lang/sdk@ed6bab8 Ideally we should actually move this whole code into `io_natives.{h,cc}` on the Dart runtime side to avoid duplication.
1 parent 44c77df commit e11e2c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

engine/src/flutter/lib/io/dart_io.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ namespace flutter {
1717

1818
void DartIO::InitForIsolate(bool may_insecurely_connect_to_all_domains,
1919
const std::string& domain_network_policy) {
20+
// TODO(https://dartbug.com/61694): move this code into dart_io_api.h
2021
Dart_Handle io_lib = Dart_LookupLibrary(ToDart("dart:io"));
2122
Dart_Handle result = Dart_SetNativeResolver(io_lib, dart::bin::LookupIONative,
2223
dart::bin::LookupIONativeSymbol);
2324
FML_CHECK(!CheckAndHandleError(result));
25+
result = Dart_SetFfiNativeResolver(io_lib, dart::bin::LookupIOFfiNative);
26+
FML_CHECK(!CheckAndHandleError(result));
2427

2528
Dart_Handle ui_lib = Dart_LookupLibrary(ToDart("dart:ui"));
2629
Dart_Handle dart_validate_args[1];

0 commit comments

Comments
 (0)