mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
While debugging a different [issue](https://github.com/flutter/flutter/issues/141588), @elliette identified a problem with the web engine when a flutter web app hot-restarts. TL;DR: the engine is requesting the framework to re-render a view as it tears them down, causing an assertion failure. This fix stops listening to changes on view "disposed" events when the engine itself is being disposed, so it doesn't trigger re-renders for views that are never coming back. ## Issues * Fixes https://github.com/flutter/flutter/issues/142030 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style