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
This complex machinery made sense for Blink, which has hundreds of
developers. In our case, we're just moving around two bools. We can do
that in a much simpler way.