47 {
48 std::scoped_lock lifecycle_lock(
gVMMutex);
49
52 << "Launch settings indicated that the VM should shut down in the "
53 "process when done but a previous launch asked the VM to leak in "
54 "the same process. For proper VM shutdown, all VM launches must "
55 "indicate that they should shut down when done.";
56 }
57
58
59
60 if (
auto vm =
gVM.lock()) {
61 FML_DLOG(WARNING) <<
"Attempted to create a VM in a process where one was "
62 "already running. Ignoring arguments for current VM "
63 "create call and reusing the old VM.";
64
66 }
67
69
74
75
76
77 auto isolate_name_server = std::make_shared<IsolateNameServer>();
79 std::move(vm_snapshot),
80 std::move(isolate_snapshot),
81 isolate_name_server
82 );
83
84 if (!vm) {
87 }
88
93
95 gVMLeak =
new std::shared_ptr<DartVM>(vm);
96 }
97
99}
DartVMRef(const DartVMRef &)=default
#define FML_DLOG(severity)
#define FML_LOG(severity)
#define FML_CHECK(condition)
static std::weak_ptr< IsolateNameServer > gVMIsolateNameServer
static std::weak_ptr< ServiceProtocol > gVMServiceProtocol
static std::mutex gVMDependentsMutex
static std::weak_ptr< DartVM > gVM
static std::weak_ptr< const DartVMData > gVMData
static std::shared_ptr< DartVM > * gVMLeak