Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | Friends | List of all members
dart::bin::IsolateGroupData Class Reference

#include <isolate_data.h>

Public Member Functions

 IsolateGroupData (const char *url, const char *packages_file, AppSnapshot *app_snapshot, bool isolate_run_app_snapshot)
 
 ~IsolateGroupData ()
 
const std::shared_ptr< uint8_t > & kernel_buffer () const
 
intptr_t kernel_buffer_size () const
 
void SetKernelBufferUnowned (uint8_t *buffer, intptr_t size)
 
void SetKernelBufferNewlyOwned (uint8_t *buffer, intptr_t size)
 
void SetKernelBufferAlreadyOwned (std::shared_ptr< uint8_t > buffer, intptr_t size)
 
const char * resolved_packages_config () const
 
void set_resolved_packages_config (const char *packages_config)
 
bool RunFromAppSnapshot () const
 
void AddLoadingUnit (AppSnapshot *loading_unit)
 

Public Attributes

char * script_url
 

Friends

class IsolateData
 

Detailed Description

Definition at line 36 of file isolate_data.h.

Constructor & Destructor Documentation

◆ IsolateGroupData()

dart::bin::IsolateGroupData::IsolateGroupData ( const char *  url,
const char *  packages_file,
AppSnapshot app_snapshot,
bool  isolate_run_app_snapshot 
)

Definition at line 12 of file isolate_data.cc.

16 : script_url((url != nullptr) ? Utils::StrDup(url) : nullptr),
17 app_snapshot_(app_snapshot),
18 resolved_packages_config_(nullptr),
19 kernel_buffer_(nullptr),
20 kernel_buffer_size_(0),
21 isolate_run_app_snapshot_(isolate_run_app_snapshot) {
22 if (packages_file != nullptr) {
23 packages_file_ = Utils::StrDup(packages_file);
24 }
25}
static char * StrDup(const char *s)

◆ ~IsolateGroupData()

dart::bin::IsolateGroupData::~IsolateGroupData ( )

Definition at line 27 of file isolate_data.cc.

27 {
28 for (intptr_t i = 0; i < loading_units_.length(); i++) {
29 delete loading_units_[i];
30 }
31 free(script_url);
32 script_url = nullptr;
33 free(packages_file_);
34 packages_file_ = nullptr;
35 free(resolved_packages_config_);
36 resolved_packages_config_ = nullptr;
37 kernel_buffer_ = nullptr;
38 kernel_buffer_size_ = 0;
39}

Member Function Documentation

◆ AddLoadingUnit()

void dart::bin::IsolateGroupData::AddLoadingUnit ( AppSnapshot loading_unit)
inline

Definition at line 100 of file isolate_data.h.

100 {
101 loading_units_.Add(loading_unit);
102 }

◆ kernel_buffer()

const std::shared_ptr< uint8_t > & dart::bin::IsolateGroupData::kernel_buffer ( ) const
inline

Definition at line 46 of file isolate_data.h.

46 {
47 return kernel_buffer_;
48 }

◆ kernel_buffer_size()

intptr_t dart::bin::IsolateGroupData::kernel_buffer_size ( ) const
inline

Definition at line 50 of file isolate_data.h.

50{ return kernel_buffer_size_; }

◆ resolved_packages_config()

const char * dart::bin::IsolateGroupData::resolved_packages_config ( ) const
inline

Definition at line 79 of file isolate_data.h.

79 {
80 return resolved_packages_config_;
81 }

◆ RunFromAppSnapshot()

bool dart::bin::IsolateGroupData::RunFromAppSnapshot ( ) const
inline

Definition at line 91 of file isolate_data.h.

91 {
92 // If the main isolate is using an app snapshot the [app_snapshot_] pointer
93 // will be still nullptr (see main.cc:CreateIsolateGroupAndSetupHelper)
94 //
95 // Because of thus we have an additional boolean signaling whether the
96 // isolate was started from an app snapshot.
97 return app_snapshot_ != nullptr || isolate_run_app_snapshot_;
98 }

◆ set_resolved_packages_config()

void dart::bin::IsolateGroupData::set_resolved_packages_config ( const char *  packages_config)
inline

Definition at line 83 of file isolate_data.h.

83 {
84 if (resolved_packages_config_ != nullptr) {
85 free(resolved_packages_config_);
86 resolved_packages_config_ = nullptr;
87 }
88 resolved_packages_config_ = Utils::StrDup(packages_config);
89 }

◆ SetKernelBufferAlreadyOwned()

void dart::bin::IsolateGroupData::SetKernelBufferAlreadyOwned ( std::shared_ptr< uint8_t >  buffer,
intptr_t  size 
)
inline

Definition at line 72 of file isolate_data.h.

73 {
74 ASSERT(kernel_buffer_.get() == nullptr);
75 kernel_buffer_ = std::move(buffer);
76 kernel_buffer_size_ = size;
77 }
#define ASSERT(E)
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
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

◆ SetKernelBufferNewlyOwned()

void dart::bin::IsolateGroupData::SetKernelBufferNewlyOwned ( uint8_t *  buffer,
intptr_t  size 
)
inline

Definition at line 63 of file isolate_data.h.

63 {
64 ASSERT(kernel_buffer_.get() == nullptr);
65 kernel_buffer_ = std::shared_ptr<uint8_t>(buffer, free);
66 kernel_buffer_size_ = size;
67 }

◆ SetKernelBufferUnowned()

void dart::bin::IsolateGroupData::SetKernelBufferUnowned ( uint8_t *  buffer,
intptr_t  size 
)
inline

Definition at line 54 of file isolate_data.h.

54 {
55 ASSERT(kernel_buffer_.get() == nullptr);
56 kernel_buffer_ = std::shared_ptr<uint8_t>(buffer, FreeUnownedKernelBuffer);
57 kernel_buffer_size_ = size;
58 }

Friends And Related Function Documentation

◆ IsolateData

friend class IsolateData
friend

Definition at line 105 of file isolate_data.h.

Member Data Documentation

◆ script_url

char* dart::bin::IsolateGroupData::script_url

Definition at line 44 of file isolate_data.h.


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