5#ifndef FLUTTER_TESTING_DART_ISOLATE_RUNNER_H_
6#define FLUTTER_TESTING_DART_ISOLATE_RUNNER_H_
8#include "flutter/common/task_runners.h"
9#include "flutter/fml/make_copyable.h"
10#include "flutter/fml/paths.h"
11#include "flutter/fml/synchronization/waitable_event.h"
12#include "flutter/fml/thread.h"
13#include "flutter/runtime/dart_isolate.h"
14#include "flutter/runtime/dart_vm.h"
15#include "flutter/runtime/dart_vm_lifecycle.h"
29 bool IsValid()
const {
return isolate_ !=
nullptr && runner_; }
38 return isolate_.get();
42 std::shared_ptr<DartIsolate> isolate_;
50 std::unique_ptr<AutoIsolateShutdown>&
result,
53 std::string entrypoint,
54 const std::vector<std::string>&
args,
55 const std::string& fixtures_path,
57 std::shared_ptr<VolatilePathTracker> volatile_path_tracker =
nullptr,
58 std::unique_ptr<PlatformConfiguration> platform_configuration =
nullptr);
64 std::string entrypoint,
65 const std::vector<std::string>&
args,
66 const std::string& fixtures_path,
68 std::shared_ptr<VolatilePathTracker> volatile_path_tracker =
nullptr,
69 std::unique_ptr<PlatformConfiguration> platform_configuration =
nullptr);
Represents an instance of a live isolate. An isolate is a separate Dart execution context....
AutoIsolateShutdown()=default
bool RunInIsolateScope(const std::function< bool(void)> &closure)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
#define FML_CHECK(condition)
Dart_NativeFunction function
std::unique_ptr< AutoIsolateShutdown > RunDartCodeInIsolate(DartVMRef &vm_ref, const Settings &settings, const TaskRunners &task_runners, std::string entrypoint, const std::vector< std::string > &args, const std::string &kernel_file_path, fml::WeakPtr< IOManager > io_manager, std::shared_ptr< VolatilePathTracker > volatile_path_tracker, std::unique_ptr< PlatformConfiguration > platform_configuration)
std::function< void()> closure