Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::bin::DartDevIsolate::DartDevRunner Class Reference

#include <dartdev_isolate.h>

Public Member Functions

 DartDevRunner ()
 
void Run (Dart_IsolateGroupCreateCallback create_isolate, char **package_config_override_, char **script, CommandLineOptions *dart_options)
 
DartDev_Result result () const
 

Detailed Description

Definition at line 64 of file dartdev_isolate.h.

Constructor & Destructor Documentation

◆ DartDevRunner()

dart::bin::DartDevIsolate::DartDevRunner::DartDevRunner ( )
inline

Definition at line 66 of file dartdev_isolate.h.

66{}

Member Function Documentation

◆ result()

DartDev_Result dart::bin::DartDevIsolate::DartDevRunner::result ( ) const
inline

Definition at line 73 of file dartdev_isolate.h.

73{ return result_; }

◆ Run()

void dart::bin::DartDevIsolate::DartDevRunner::Run ( Dart_IsolateGroupCreateCallback  create_isolate,
char **  package_config_override_,
char **  script,
CommandLineOptions dart_options 
)

Definition at line 120 of file dartdev_isolate.cc.

124 {
125 create_isolate_ = create_isolate;
126 dart_options_ = dart_options;
127 package_config_override_ = packages_file;
128 script_ = script;
129
130 // We've encountered an error during preliminary argument parsing so we'll
131 // output the standard help message and exit with an error code.
132 if (print_usage_error_) {
133 dart_options_->Reset();
134 dart_options_->AddArgument("--help");
135 }
136
137 MonitorLocker locker(monitor_);
138 int result = Thread::Start("DartDev Runner", RunCallback,
139 reinterpret_cast<uword>(this));
140 if (result != 0) {
141 FATAL("Failed to start DartDev thread: %d", result);
142 }
144
145 if (result_ == DartDevIsolate::DartDev_Result_Run) {
146 // Clear the DartDev dart_options and replace them with the processed
147 // options provided by DartDev.
148 dart_options_->Reset();
149 dart_options_->AddArguments(const_cast<const char**>(argv_.get()), argc_);
150 }
151}
void AddArguments(const char **argv, int argc)
Definition: dartutils.h:77
void AddArgument(const char *argument)
Definition: dartutils.h:68
static constexpr int64_t kNoTimeout
Definition: thread.h:79
WaitResult WaitMicros(int64_t micros)
static int Start(const char *name, ThreadStartFunction function, uword parameters)
#define FATAL(error)
uintptr_t uword
Definition: globals.h:501

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