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.
This patch changes how we lookup native functions from Dart to be more
extensible. This patch paves the way for removing the dart:ui_internals
library.
I left this code along in my uber patch to remove the DOM and CSS, but it's
just as dead. Also, move lone files out of dead directories into more sensible
places.
Instead, we can just concatenate the records together, which means you can view
the generated trace file without post-processing. Also, I've made the trace
file world-readable, so that you can trace a device without needing root
access.
Roll Dart runtime forward to:
6aab1cecb25f8e04087320f2082336073628afb4
Roll Observatory pub packages to:
5c199c5954146747f75ed127871207718dc87786
---
Update to new isolate create callback signature.
Currently we run some tasks on the UI thread that shouldn't block the frame,
such as decoding images. This patch introduces a background thread on which we
can run these tasks.
This adds a new placeholder dart package updater in sky/packages. This is built
into a snapshot and compiled into the Sky engine binary using the same
mechanism as the Dart isolate.
I also added a SkyHeadless class, similar to SkyView, used for running Dart
code without a view.
This updates to mojo commit d259eb58aa59 and limits the roll script to
only pull in the parts of //mojo that are currently being used. More
stuff will be dropped in the future.
Now we print Dart_GetError only when we don't have a stack trace. Also, improve
the usability of the sky_shell command line tool by defaulting to "packages"
for the package-root and not crashing when we don't have a package-root until
we actually try to load a package. Finally, remove console spam when we fail to
bind the observatory port.
Fixes#689