Skip to content

Commit

Permalink
Do not remove the DartServiceIsolate status callback during FlutterMa…
Browse files Browse the repository at this point in the history
…in destruction (#9368)

FlutterMain and the DartServiceIsolate callback list are both globals, and the
callback list state may have already been destructed when FlutterMain's
destructor runs.
  • Loading branch information
jason-simmons authored and tvolkert committed Jun 19, 2019
1 parent 4c9fa49 commit c764a76
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions shell/platform/android/flutter_main.cc
Expand Up @@ -42,11 +42,7 @@ fml::jni::ScopedJavaGlobalRef<jclass>* g_flutter_jni_class = nullptr;
FlutterMain::FlutterMain(flutter::Settings settings)
: settings_(std::move(settings)), observatory_uri_callback_() {}

FlutterMain::~FlutterMain() {
if (observatory_uri_callback_) {
DartServiceIsolate::RemoveServerStatusCallback(observatory_uri_callback_);
}
}
FlutterMain::~FlutterMain() = default;

static std::unique_ptr<FlutterMain> g_flutter_main;

Expand Down

0 comments on commit c764a76

Please sign in to comment.