Do not remove the DartServiceIsolate status callback during FlutterMain destruction (flutter/engine#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.
This commit is contained in:
Jason Simmons
2019-06-18 22:34:04 -07:00
committed by Todd Volkert
parent 4ad78e92cd
commit 1cd5ed308a

View File

@@ -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;