提交 c764a762 编写于 作者: J Jason Simmons 提交者: Todd Volkert

Do not remove the DartServiceIsolate status callback during FlutterMain 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.
上级 4c9fa494
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册