The UIDartState is now always owned by the isolate and always freed in
the isolate cleanup callback.
In the isolate shutdown callback, if the isolate being shut down is the
main isolate, the RuntimeController is informed which in turn notifies
the RuntimeHolder and thus the ApplicationControllerImpl. The
ApplicationControllerImpl tears down the whole Flutter application.
This fixes Fuchsia bug: MI4-328
* Read core platform kernel file during Dart initialization.
Currently service isolate is initialized from the source code parsed by VM.
This CL changes it so service isolate created during Dart initialization
is created from the kernel platform.dill file if it is present in the application
bundle. Then this platform kernel file is kept in dart_init module and reused
for application sciprt isolates.
* Reformat and merge
* Use accessor method
* Avoid passing running_from_kernel param. Add TODO for cleanup. Rename param.
* Fix for issue 12526
Ensure that child isolates do not clear the dart_ui_state_ field present in the dart controller.
The commit 093a8a4dfd implemented code to reset the dart_ui_state_ back to null when an isolate was being shutdown to ensure there was no use after free issues when the main isolate exeutes Isolate.current.kill() it however it was also clearning the field when a child isolate was shutdown causing SEGVs later.
* Address code format issues.
* Change to new SkFontMgr API
These changes clarify ownership rules and work today. They will be
necessary once SK_SUPPORT_LEGACY_FONTMGR_API goes away.
* Fix spacing
* Formatting
- Remove linking of dart_debugger.cc as this is not used
(all debugging is done using the service API, this debugger implementation uses the deprecated dart debugger API)
If an isolate shuts down (for example if an app calls
Isolate.current.kill()), the UIDartState* on DartController will refer
to a freed object. This wires through notification that the is shutting
down through to the DartController so it can clean up appropriately.
This also makes gives the vm-service isolate an UIDartState* so that
the shutdown callback can behave correctly.
By adding these events the new developer centric timeline will be able
to identify and correlate events related to the different stages of the
drawing pipeline.
Roll Dart to 62045a4590a333ae557f8f261a909ee75449cd70
If an isolate shuts down (for example if an app calls
Isolate.current.kill()), the UIDartState* on DartController will refer
to a freed object. This wires through notification that the is shutting
down through to the DartController so it can clean up appropriately.
* Fix remaining ftl->fxl conversions
The previous scripting pass at this did not account for objective c file endings
* Update tonic DEPS reference to the post-fxl version
- Assumes only the Dart VM is interested in idle notification.
- Gives the VM the time remaining in each frame.
- Gives the VM 100ms if there is no pending frame.
Issue flutter/flutter#9594
Dart_DebugName should be used just to make debug outputs more readable.
We remove the dependency from this API and form the UIDartState debug
name in the engine using the predefined format:
<script_uri>$main-<main_port>
This will allow the engine to change the format of the isolate name
without breaking the engine.
Related https://codereview.chromium.org/3004563003/