mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Populate dart_library_sources_kernel in the embedder library in JIT mode (flutter/engine#36059)
This commit is contained in:
parent
1b44df099e
commit
6e87e08277
@ -1190,6 +1190,14 @@ void PopulateJITSnapshotMappingCallbacks(const FlutterProjectArgs* args,
|
||||
reinterpret_cast<const char*>(args->isolate_snapshot_instructions),
|
||||
true);
|
||||
}
|
||||
|
||||
#if !OS_FUCHSIA && (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG)
|
||||
settings.dart_library_sources_kernel = []() {
|
||||
return std::make_unique<fml::NonOwnedMapping>(kPlatformStrongDill,
|
||||
kPlatformStrongDillSize);
|
||||
};
|
||||
#endif // !OS_FUCHSIA && (FLUTTER_RUNTIME_MODE ==
|
||||
// FLUTTER_RUNTIME_MODE_DEBUG)
|
||||
}
|
||||
|
||||
void PopulateAOTSnapshotMappingCallbacks(
|
||||
@ -1239,12 +1247,6 @@ void PopulateAOTSnapshotMappingCallbacks(
|
||||
args->isolate_snapshot_instructions,
|
||||
SAFE_ACCESS(args, isolate_snapshot_instructions_size, 0));
|
||||
}
|
||||
|
||||
#if !OS_FUCHSIA && (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG)
|
||||
settings.dart_library_sources_kernel =
|
||||
make_mapping_callback(kPlatformStrongDill, kPlatformStrongDillSize);
|
||||
#endif // !OS_FUCHSIA && (FLUTTER_RUNTIME_MODE ==
|
||||
// FLUTTER_RUNTIME_MODE_DEBUG)
|
||||
}
|
||||
|
||||
FlutterEngineResult FlutterEngineRun(size_t version,
|
||||
|
||||
@ -1354,6 +1354,7 @@ TEST_F(EmbedderTest, CanSuccessfullyPopulateSpecificJITSnapshotCallbacks) {
|
||||
ASSERT_NE(settings.vm_snapshot_instr(), nullptr);
|
||||
ASSERT_NE(settings.isolate_snapshot_data(), nullptr);
|
||||
ASSERT_NE(settings.isolate_snapshot_instr(), nullptr);
|
||||
ASSERT_NE(settings.dart_library_sources_kernel(), nullptr);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user