20 auto settings = CreateSettingsForFixture();
21 settings.leak_vm =
false;
22 settings.enable_vm_service =
false;
32 auto settings = CreateSettingsForFixture();
33 settings.leak_vm =
false;
34 settings.enable_vm_service =
false;
37 for (
size_t i = 0;
i < 10;
i++) {
50 std::string entrypoint) {
52 TaskRunners runners(
"io.flutter.test", task_runner, task_runner, task_runner,
55 auto isolate_configuration =
73 std::move(isolate_configuration),
79 FML_LOG(ERROR) <<
"Could not launch the root isolate.";
89 auto settings = CreateSettingsForFixture();
90 settings.leak_vm =
false;
92 settings.enable_vm_service =
true;
94 auto thread_task_runner = CreateNewThread();
96 for (
size_t i = 0;
i < 3;
i++) {
106 const size_t isolate_count = 5;
109 auto vm_data = vm_ref.GetVMData();
110 for (
size_t i = 0;
i < isolate_count; ++
i) {
111 thread_task_runner->PostTask(
112 [vm_data, &settings, &latch, thread_task_runner]() {
115 "testIsolateShutdown"));
static std::weak_ptr< DartIsolate > CreateRunningRootIsolate(const Settings &settings, const fml::RefPtr< const DartSnapshot > &isolate_snapshot, std::unique_ptr< PlatformConfiguration > platform_configuration, Flags flags, const fml::closure &root_isolate_create_callback, const fml::closure &isolate_create_callback, const fml::closure &isolate_shutdown_callback, std::optional< std::string > dart_entrypoint, std::optional< std::string > dart_entrypoint_library, const std::vector< std::string > &dart_entrypoint_args, std::unique_ptr< IsolateConfiguration > isolate_configuration, const UIDartState::Context &context, const DartIsolate *spawning_isolate=nullptr, std::shared_ptr< NativeAssetsManager > native_assets_manager=nullptr)
Creates an instance of a root isolate and returns a weak pointer to the same. The isolate instance ma...
Provides thread-safe access to data that is necessary to bootstrap a new Dart VM instance....
fml::RefPtr< const DartSnapshot > GetIsolateSnapshot() const
Get the isolate snapshot necessary to launch isolates in the Dart VM. The Dart VM instance in which t...
const Settings & GetSettings() const
The settings object from which the Dart snapshots were inferred.
static size_t GetVMLaunchCount()
The number of times the VM has been launched in the process. This call is inherently racy because the...
static DartVMRef Create(const Settings &settings, fml::RefPtr< const DartSnapshot > vm_snapshot=nullptr, fml::RefPtr< const DartSnapshot > isolate_snapshot=nullptr)
static bool IsInstanceRunning()
static std::unique_ptr< IsolateConfiguration > InferFromSettings(const Settings &settings, const std::shared_ptr< AssetManager > &asset_manager=nullptr, const fml::RefPtr< fml::TaskRunner > &io_worker=nullptr, IsolateLaunchType launch_type=IsolateLaunchType::kNewGroup)
Attempts to infer the isolate configuration from the Settings object. If the VM is configured for AOT...
#define FML_LOG(severity)
#define FML_CHECK(condition)
TEST_F(DisplayListTest, Defaults)
static std::shared_ptr< DartIsolate > CreateAndRunRootIsolate(const Settings &settings, const DartVMData &vm, const fml::RefPtr< fml::TaskRunner > &task_runner, std::string entrypoint)
fml::closure isolate_shutdown_callback
fml::closure isolate_create_callback
The subset of state which is owned by the shell or engine and passed through the RuntimeController in...
std::string advisory_script_uri
std::string advisory_script_entrypoint