5#ifndef FLUTTER_RUNTIME_ISOLATE_CONFIGURATION_H_
6#define FLUTTER_RUNTIME_ISOLATE_CONFIGURATION_H_
12#include "flutter/assets/asset_manager.h"
13#include "flutter/assets/asset_resolver.h"
14#include "flutter/common/settings.h"
15#include "flutter/fml/macros.h"
16#include "flutter/fml/mapping.h"
17#include "flutter/fml/memory/weak_ptr.h"
18#include "flutter/runtime/dart_isolate.h"
81 const std::shared_ptr<AssetManager>& asset_manager =
nullptr,
109 std::vector<std::future<std::unique_ptr<const fml::Mapping>>>
125 std::unique_ptr<const fml::Mapping> kernel);
140 std::vector<std::unique_ptr<const fml::Mapping>> kernel_pieces);
Represents an instance of a live isolate. An isolate is a separate Dart execution context....
A read-only Dart heap snapshot, or, read-executable mapping of AOT compiled Dart code.
An isolate configuration is a collection of snapshots and asset managers that the engine will use to ...
bool PrepareIsolate(DartIsolate &isolate)
When an isolate is created and sufficiently initialized to move it into the DartIsolate::Phase::Libra...
virtual bool IsNullSafetyEnabled(const DartSnapshot &snapshot)=0
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...
virtual ~IsolateConfiguration()
Destroys an isolate configuration. This has no threading restrictions and may be collection of config...
IsolateConfiguration()
Create an isolate configuration. This has no threading restrictions.
static std::unique_ptr< IsolateConfiguration > CreateForKernelList(std::vector< std::future< std::unique_ptr< const fml::Mapping > > > kernel_pieces)
Creates a JIT isolate configuration using a list of futures to snapshots defining the ready isolate s...
static std::unique_ptr< IsolateConfiguration > CreateForAppSnapshot()
Creates an AOT isolate configuration using snapshot symbols present in the currently loaded process....
static std::unique_ptr< IsolateConfiguration > CreateForKernel(std::unique_ptr< const fml::Mapping > kernel)
Creates a JIT isolate configuration using the specified snapshot. This is a convenience method for th...
virtual bool DoPrepareIsolate(DartIsolate &isolate)=0
@ kNewGroup
The isolate is launched as a solo isolate or to start a new group.