@@ -69,7 +69,7 @@ RuntimeController::~RuntimeController() {
69
69
}
70
70
71
71
bool RuntimeController::IsRootIsolateRunning () {
72
- std::shared_ptr<DartIsolate> root_isolate = GetRootIsolate () .lock ();
72
+ std::shared_ptr<DartIsolate> root_isolate = root_isolate_ .lock ();
73
73
if (root_isolate) {
74
74
return root_isolate->GetPhase () == DartIsolate::Phase::Running;
75
75
}
@@ -196,7 +196,7 @@ bool RuntimeController::ReportTimings(std::vector<int64_t> timings) {
196
196
}
197
197
198
198
bool RuntimeController::NotifyIdle (int64_t deadline, size_t freed_hint) {
199
- std::shared_ptr<DartIsolate> root_isolate = GetRootIsolate () .lock ();
199
+ std::shared_ptr<DartIsolate> root_isolate = root_isolate_ .lock ();
200
200
if (!root_isolate) {
201
201
return false ;
202
202
}
@@ -256,7 +256,7 @@ bool RuntimeController::DispatchSemanticsAction(int32_t id,
256
256
257
257
PlatformConfiguration*
258
258
RuntimeController::GetPlatformConfigurationIfAvailable () {
259
- std::shared_ptr<DartIsolate> root_isolate = GetRootIsolate () .lock ();
259
+ std::shared_ptr<DartIsolate> root_isolate = root_isolate_ .lock ();
260
260
return root_isolate ? root_isolate->platform_configuration () : nullptr ;
261
261
}
262
262
@@ -318,17 +318,17 @@ RuntimeController::ComputePlatformResolvedLocale(
318
318
}
319
319
320
320
Dart_Port RuntimeController::GetMainPort () {
321
- std::shared_ptr<DartIsolate> root_isolate = GetRootIsolate () .lock ();
321
+ std::shared_ptr<DartIsolate> root_isolate = root_isolate_ .lock ();
322
322
return root_isolate ? root_isolate->main_port () : ILLEGAL_PORT;
323
323
}
324
324
325
325
std::string RuntimeController::GetIsolateName () {
326
- std::shared_ptr<DartIsolate> root_isolate = GetRootIsolate () .lock ();
326
+ std::shared_ptr<DartIsolate> root_isolate = root_isolate_ .lock ();
327
327
return root_isolate ? root_isolate->debug_name () : " " ;
328
328
}
329
329
330
330
bool RuntimeController::HasLivePorts () {
331
- std::shared_ptr<DartIsolate> root_isolate = GetRootIsolate () .lock ();
331
+ std::shared_ptr<DartIsolate> root_isolate = root_isolate_ .lock ();
332
332
if (!root_isolate) {
333
333
return false ;
334
334
}
@@ -337,7 +337,7 @@ bool RuntimeController::HasLivePorts() {
337
337
}
338
338
339
339
tonic::DartErrorHandleType RuntimeController::GetLastError () {
340
- std::shared_ptr<DartIsolate> root_isolate = GetRootIsolate () .lock ();
340
+ std::shared_ptr<DartIsolate> root_isolate = root_isolate_ .lock ();
341
341
return root_isolate ? root_isolate->GetLastError () : tonic::kNoError ;
342
342
}
343
343
@@ -411,15 +411,6 @@ std::optional<std::string> RuntimeController::GetRootIsolateServiceID() const {
411
411
return std::nullopt;
412
412
}
413
413
414
- std::weak_ptr<DartIsolate> RuntimeController::GetRootIsolate () {
415
- std::shared_ptr<DartIsolate> root_isolate = root_isolate_.lock ();
416
- if (root_isolate) {
417
- return root_isolate_;
418
- }
419
-
420
- return root_isolate_;
421
- }
422
-
423
414
std::optional<uint32_t > RuntimeController::GetRootIsolateReturnCode () {
424
415
return root_isolate_return_code_;
425
416
}
0 commit comments