5#ifndef FLUTTER_RUNTIME_DART_VM_LIFECYCLE_H_
6#define FLUTTER_RUNTIME_DART_VM_LIFECYCLE_H_
10#include "flutter/fml/macros.h"
11#include "flutter/lib/ui/isolate_name_server/isolate_name_server.h"
12#include "flutter/runtime/dart_vm.h"
13#include "flutter/runtime/service_protocol.h"
14#include "third_party/dart/runtime/include/dart_tools_api.h"
46 static std::shared_ptr<const DartVMData>
GetVMData();
52 explicit operator bool()
const {
return static_cast<bool>(vm_); }
83 std::shared_ptr<DartVM> vm_;
85 explicit DartVMRef(std::shared_ptr<DartVM> vm);
88 static DartVM* GetRunningVM();
Represents an instance of a live isolate. An isolate is a separate Dart execution context....
const DartVM * get() const
const DartVM * operator->() const
static DartVMRef Create(const Settings &settings, fml::RefPtr< const DartSnapshot > vm_snapshot=nullptr, fml::RefPtr< const DartSnapshot > isolate_snapshot=nullptr)
DartVMRef(const DartVMRef &)=default
static std::shared_ptr< IsolateNameServer > GetIsolateNameServer()
static bool IsInstanceRunning()
static std::shared_ptr< ServiceProtocol > GetServiceProtocol()
static std::shared_ptr< const DartVMData > GetVMData()
Describes a running instance of the Dart VM. There may only be one running instance of the Dart VM in...
#define FML_DCHECK(condition)