Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
flutter::DartIsolateGroupData Class Reference

#include <dart_isolate_group_data.h>

Inheritance diagram for flutter::DartIsolateGroupData:
flutter::PlatformMessageHandlerStorage

Public Member Functions

 DartIsolateGroupData (const Settings &settings, fml::RefPtr< const DartSnapshot > isolate_snapshot, std::string advisory_script_uri, std::string advisory_script_entrypoint, const ChildIsolatePreparer &child_isolate_preparer, const fml::closure &isolate_create_callback, const fml::closure &isolate_shutdown_callback)
 
 ~DartIsolateGroupData ()
 
const SettingsGetSettings () const
 
fml::RefPtr< const DartSnapshotGetIsolateSnapshot () const
 
const std::string & GetAdvisoryScriptURI () const
 
const std::string & GetAdvisoryScriptEntrypoint () const
 
ChildIsolatePreparer GetChildIsolatePreparer () const
 
const fml::closureGetIsolateCreateCallback () const
 
const fml::closureGetIsolateShutdownCallback () const
 
void SetChildIsolatePreparer (const ChildIsolatePreparer &value)
 
void AddKernelBuffer (const std::shared_ptr< const fml::Mapping > &buffer)
 Adds a kernel buffer mapping to the kernels loaded for this isolate group.
 
std::vector< std::shared_ptr< const fml::Mapping > > GetKernelBuffers () const
 
void SetPlatformMessageHandler (int64_t root_isolate_token, std::weak_ptr< PlatformMessageHandler > handler) override
 
std::weak_ptr< PlatformMessageHandlerGetPlatformMessageHandler (int64_t root_isolate_token) const override
 
- Public Member Functions inherited from flutter::PlatformMessageHandlerStorage
virtual ~PlatformMessageHandlerStorage ()=default
 

Detailed Description

Definition at line 31 of file dart_isolate_group_data.h.

Constructor & Destructor Documentation

◆ DartIsolateGroupData()

flutter::DartIsolateGroupData::DartIsolateGroupData ( const Settings settings,
fml::RefPtr< const DartSnapshot isolate_snapshot,
std::string  advisory_script_uri,
std::string  advisory_script_entrypoint,
const ChildIsolatePreparer child_isolate_preparer,
const fml::closure isolate_create_callback,
const fml::closure isolate_shutdown_callback 
)

Definition at line 13 of file dart_isolate_group_data.cc.

21 : settings_(settings),
22 isolate_snapshot_(std::move(isolate_snapshot)),
23 advisory_script_uri_(std::move(advisory_script_uri)),
24 advisory_script_entrypoint_(std::move(advisory_script_entrypoint)),
25 child_isolate_preparer_(child_isolate_preparer),
26 isolate_create_callback_(isolate_create_callback),
27 isolate_shutdown_callback_(isolate_shutdown_callback) {
28 FML_DCHECK(isolate_snapshot_) << "Must contain a valid isolate snapshot.";
29}
#define FML_DCHECK(condition)
Definition logging.h:103

◆ ~DartIsolateGroupData()

flutter::DartIsolateGroupData::~DartIsolateGroupData ( )
default

Member Function Documentation

◆ AddKernelBuffer()

void flutter::DartIsolateGroupData::AddKernelBuffer ( const std::shared_ptr< const fml::Mapping > &  buffer)

Adds a kernel buffer mapping to the kernels loaded for this isolate group.

Definition at line 86 of file dart_isolate_group_data.cc.

87 {
88 kernel_buffers_.push_back(buffer);
89}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition switches.h:126

◆ GetAdvisoryScriptEntrypoint()

const std::string & flutter::DartIsolateGroupData::GetAdvisoryScriptEntrypoint ( ) const

Definition at line 46 of file dart_isolate_group_data.cc.

46 {
47 return advisory_script_entrypoint_;
48}

◆ GetAdvisoryScriptURI()

const std::string & flutter::DartIsolateGroupData::GetAdvisoryScriptURI ( ) const

Definition at line 42 of file dart_isolate_group_data.cc.

42 {
43 return advisory_script_uri_;
44}

◆ GetChildIsolatePreparer()

ChildIsolatePreparer flutter::DartIsolateGroupData::GetChildIsolatePreparer ( ) const

Definition at line 50 of file dart_isolate_group_data.cc.

50 {
51 std::scoped_lock lock(child_isolate_preparer_mutex_);
52 return child_isolate_preparer_;
53}

◆ GetIsolateCreateCallback()

const fml::closure & flutter::DartIsolateGroupData::GetIsolateCreateCallback ( ) const

Definition at line 55 of file dart_isolate_group_data.cc.

55 {
56 return isolate_create_callback_;
57}

◆ GetIsolateShutdownCallback()

const fml::closure & flutter::DartIsolateGroupData::GetIsolateShutdownCallback ( ) const

Definition at line 59 of file dart_isolate_group_data.cc.

59 {
60 return isolate_shutdown_callback_;
61}

◆ GetIsolateSnapshot()

fml::RefPtr< const DartSnapshot > flutter::DartIsolateGroupData::GetIsolateSnapshot ( ) const

Definition at line 37 of file dart_isolate_group_data.cc.

38 {
39 return isolate_snapshot_;
40}

◆ GetKernelBuffers()

std::vector< std::shared_ptr< const fml::Mapping > > flutter::DartIsolateGroupData::GetKernelBuffers ( ) const

A copy of the mappings for all kernel buffer objects loaded into this isolate group.

Definition at line 92 of file dart_isolate_group_data.cc.

92 {
93 return kernel_buffers_;
94}

◆ GetPlatformMessageHandler()

std::weak_ptr< PlatformMessageHandler > flutter::DartIsolateGroupData::GetPlatformMessageHandler ( int64_t  root_isolate_token) const
overridevirtual

Implements flutter::PlatformMessageHandlerStorage.

Definition at line 77 of file dart_isolate_group_data.cc.

78 {
79 std::scoped_lock lock(platform_message_handlers_mutex_);
80 auto it = platform_message_handlers_.find(root_isolate_token);
81 return it == platform_message_handlers_.end()
82 ? std::weak_ptr<PlatformMessageHandler>()
83 : it->second;
84}

◆ GetSettings()

const Settings & flutter::DartIsolateGroupData::GetSettings ( ) const

Definition at line 33 of file dart_isolate_group_data.cc.

33 {
34 return settings_;
35}

◆ SetChildIsolatePreparer()

void flutter::DartIsolateGroupData::SetChildIsolatePreparer ( const ChildIsolatePreparer value)

Definition at line 63 of file dart_isolate_group_data.cc.

64 {
65 std::scoped_lock lock(child_isolate_preparer_mutex_);
66 child_isolate_preparer_ = value;
67}
uint8_t value

◆ SetPlatformMessageHandler()

void flutter::DartIsolateGroupData::SetPlatformMessageHandler ( int64_t  root_isolate_token,
std::weak_ptr< PlatformMessageHandler handler 
)
overridevirtual

Implements flutter::PlatformMessageHandlerStorage.

Definition at line 69 of file dart_isolate_group_data.cc.

71 {
72 std::scoped_lock lock(platform_message_handlers_mutex_);
73 platform_message_handlers_[root_isolate_token] = handler;
74}

The documentation for this class was generated from the following files: