mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This fixes a race that can happen if Dart invokes an isolate's message handling callback during isolate shutdown. The callback installed by Tonic will invoke a dispatcher set by the engine's DartIsolate::SetMessageHandlingTaskRunner, which will queue a message handling task to the designated task runner. If the queued task runs after DartIsolate::Shutdown has been called, then Tonic's DartMessageHandler::OnHandleMessage will fail when it tries to enter the isolate. DartIsolate will set a shutdown flag on the DartState when Dart invokes the isolate's shutdown callback. Tonic can avoid this race by checking that flag before proceeding with message handling. Fixes https://github.com/flutter/flutter/issues/160003
flutter/third_party
This directory contains third-party code that is a combination of:
-
Code that is vendored into the Flutter repository, from an external source. For example, we might have
third_party/glfw, which contains the GLFW library, vendored from an external repository.💡 TIP: See
DEPSfor where these sources are declared. -
Code that originates from another repository, but is copied (sometimes with alterations) into the Flutter repository. For an example, see
third_party/spring_animation. -
Code that is licensed separately from the rest of the Flutter repository. For example, see
third_party/txt.
When adding a new externally sourced third-party library, update .gitignore:
# Ignores all third_party/ directories except for the ones we want to track.
+ !{folder_name}/