commit | f459a8661001b281ec906321899e717df3f22ffa | [log] [tgz] |
---|---|---|
author | Chinmay Garde <chinmaygarde@google.com> | Wed Oct 21 15:57:10 2020 -0700 |
committer | GitHub <noreply@github.com> | Wed Oct 21 15:57:10 2020 -0700 |
tree | cd42e7feab688f21c2404a34ff87e7176cd4855d | |
parent | fc72bd2ada5d8d9b4ab2c1255d4f960cc44b5de0 [diff] |
Ensure root isolate create callback is invoked before the isolate is in the running phase. (#22041) Embedders that have access to the Dart native API (only Fuchsia now) may perform library setup in the isolate create callback. The engine used to depend on the fact the root isolate entrypoint is invoked in the next iteration of message loop (via the `_startIsolate` trampoline in `isolate_patch.dart`) to ensure that library setup occur before the main entrypoint was invoked. However, due to differences in the way in which message loops are setup in Fuchsia, this entrypoint was run before the callback could be executed. Dart code on Fuchsia also has the ability to access the underlying event loops directly. This patch moves the invocation of the create callback to before user dart code has a chance to run. This difference in behavior on Fuchsia became an issue when the isolate initialization was reworked in https://github.com/flutter/engine/pull/21820 for null-safety. Another issue was discovered in that the callback was being invoked twice, I fixed that too and added a test. Fixes https://github.com/flutter/flutter/issues/68732
Flutter is Google's mobile app SDK for crafting high-quality native interfaces in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
The Flutter Engine is a portable runtime for hosting Flutter applications. It implements Flutter's core libraries, including animation and graphics, file and network I/O, accessibility support, plugin architecture, and a Dart runtime and compile toolchain. Most developers will interact with Flutter via the Flutter Framework, which provides a modern, reactive framework, and a rich set of platform, layout and foundation widgets.
If you want to run/contribute to Flutter Web engine, more tooling can be found at felt. This is a tool written to make web engine development experience easy.
If you are new to Flutter, then you will find more general information on the Flutter project, including tutorials and samples, on our Web site at Flutter.dev. For specific information about Flutter's APIs, consider our API reference which can be found at the docs.flutter.dev.
Flutter is a fully open source project, and we welcome contributions. Information on how to get started can be found at our contributor guide.