Previously the AOT snapshot was packaged as a dynamic library (similar to the
scheme used on iOS). This change eliminates the need for a native code
toolchain when building for AOT.
This include build system changes for selecting Dart's precompiler mode
plus a way to locate and load the precompiled snapshot library from an
Android application
Dart invokes Start/StopTracing callbacks within the _setVMTimelineFlags service
method whenever the embedder timeline stream toggles on or off. Flutter's
implementation of these callbacks was modifying the set of enabled streams,
which could override the intended behavior of _setVMTimelineFlags.
Start/StopTracing will now only control Flutter's embedder-specific log.
Also needed to change the Flutter engine's --trace-startup flag to set the
corresponding timeline stream flag on the Dart VM.
This solves two problems:
* UIDartState was being deleted during destruction of DartController after the
isolate had been shut down. The UIDartState held persistent handles to Dart
objects, and deleting them when the isolate no longer exists caused an
assertion failure.
* DartStates created for secondary isolates were never being deleted
Fixes https://github.com/flutter/flutter/issues/2549
Dart_IsolateMakeRunnable was returning false, which can indicate that the
isolate was already running. This patch seems harmless, but I'll follow up to
understand more about what's happening here.
Fixes#2383
The FLX will contain a font manifest JSON file that maps font family names
to custom font assets. Flutter will provide a FontSelector that loads
fonts on demand and caches typeface and style data.
We used to share memory between Dart strings and WTF::String objects by
way of the Dart externalized strings. That used to be important when the
DOM shared many strings between C++ and Dart. However, now that we don't
retain strings in C++ much anymore, we don't need this complexity.
This patch removes DartStringCache and the integration. It also unwinds
several cases where we were converting back and forth between
WTF::String and std::string for no reason. Now we use std::string more
consistently.
For the case of ParagraphBuilder::addText, we now take a raw const
char*, which more closely matches the API the DartVM exposes. That means
we do a single copy out of the VM and into the render tree at that
point.
Moving the microtask queue into tonic solves three problems:
1) Removes three levels of indirection when invoking microtask
callbacks.
2) Removes the sky/engine/dom directory entirely.
3) Removes the last client of the (inefficient) DartValue class.
* Conversion of all primitive types, wrapped Java objects, and nulls between Dart and Java
* A way to distinguish float arguments from doubles when calling Java methods
* Construction of a Dart JniClass from a Java class object