55 Commits

Author SHA1 Message Date
Ian McKellar
d917c35e72
Allow Flutter apps on Fuchsia to shut down cleanly (#4366)
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
2017-11-15 13:28:21 -08:00
Alexander Markov
11d68f63da
Revert "Enable Dart 2.0 fixed-size integers in Flutter (#4337)" (#4344)
This reverts commit 0b7582e6a130fc99270dafec5113a7ec46ed522a.
2017-11-10 11:08:42 -08:00
Alexander Markov
0b7582e6a1
Enable Dart 2.0 fixed-size integers in Flutter (#4337) 2017-11-09 09:42:40 -08:00
Alexander Aprelev
ec19da1c80 Initialize service isolate from kernel file, rather than from embedded sources. (#4263)
* 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.
2017-10-24 19:37:24 -07:00
P.Y. Laligand
6fcb45991d Move //dart to //third_party/dart. (#4245) 2017-10-19 01:20:38 -07:00
Siva
5003703330 Fix for issue 12526 (#4218)
* Fix for issue 12526

Ensure that child isolates do not clear the dart_ui_state_ field present in the dart controller.

The commit dd1e0b59ec 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.
2017-10-17 14:47:09 -07:00
Zachary Anderson
be547d66c2 Remove daed --assert_initializer flag (#4181) 2017-10-06 14:54:08 -07:00
Siva
79cb2eaf65 - Remove call to DartDebugger::InitDebugger in InitDartVM (#4167)
- 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)
2017-10-03 16:49:43 -07:00
Jason Simmons
e1aa86739b Provide an entropy source to the Dart engine (#4161)
This is required by the _CryptoUtils class used by the recently repackaged
Dart HTTP libraries
2017-10-02 12:40:29 -07:00
Ian McKellar
dd1e0b59ec Support cleaner Dart isolate shutdown handling. (#4121)
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.
2017-09-19 12:11:05 -07:00
Alexander Aprelev
0e8ffa24e0 Reverting to unblock engine roll (#4109)
* Revert "Make Travis happy again (#4101)"

This reverts commit c99b2559df05f4b5f547d26bb0a61d88809f5564.

* Revert "Support cleaner Dart isolate shutdown handling. (#4096)"

This reverts commit 05751f7be993316057d772e8334a783537e10e26.
2017-09-14 12:10:11 -07:00
Alexander Aprelev
1b367b06f1 Provide callback to free fetched bytes when reading kernel binary. (#4095) 2017-09-14 08:01:25 -07:00
Michael Goderbauer
c99b2559df Make Travis happy again (#4101) 2017-09-13 12:42:37 -07:00
Ian McKellar
05751f7be9 Support cleaner Dart isolate shutdown handling. (#4096)
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.
2017-09-13 10:29:21 -07:00
Michael Goderbauer
08961f8ec5 Format all c-like sources with clang-format (#4088)
* format

* license script adaptions

* updated licenses

* review comments
2017-09-12 15:36:20 -07:00
George Kulakowski
3aa7522c11 Rename ftl to fxl in Fuchsia specific code (#4090) 2017-09-11 15:58:48 -07:00
Carlo Bernaschina
a246501917 Roll Dart to 491390eeaa7974f44a8931d10a899c39c0df8dda (#3984)
- Roll Dart to 491390eeaa7974f44a8931d10a899c39c0df8dda
- Register the EmbedderInformationCallback
2017-08-16 13:17:11 -07:00
Yegor
ff50334587 enable async stack traces in all modes (#3948) 2017-08-04 12:22:20 -07:00
Alexander Aprelev
ba9a525bdc Update Flutter engine kernel-loading logic. (#3886)
* Fix Flutter loading from dill files.

* Remove disable of causal async stacks.

* Include mirrors patch files as they are needed for release/profile gen_snapshot

* Free the bytes

* Add FTL_DCHECK
2017-07-24 09:47:23 -07:00
Zachary Anderson
e385c1b454 [Fuchsia] Pass command line arguments for tracing (#3868) 2017-07-12 15:17:24 -07:00
Ryan Macnak
dd634d349d Revert "Allow SIGQUIT to toggle the vm-service server a la command line Dart. (#3857)" (#3859)
This reverts commit d67b614a29fe9dc112ddc0b60b6eb685c1f55eb1.

Fuchsia TO-370
2017-07-10 15:57:26 -07:00
Ryan Macnak
d67b614a29 Allow SIGQUIT to toggle the vm-service server a la command line Dart. (#3857)
Fixes flutter/flutter#9128
2017-07-10 13:08:00 -07:00
Zachary Anderson
11131b2678 [Fuchsia] For profiling, export symbols, profile the VM (#3756) 2017-06-08 13:57:31 -07:00
Todd Volkert
f5d92bee15 Add ipv6 flag to shell. (#3646)
It controls whether the observatory and diagnostic server will
bind to the IPv6 loopback address rather than the IPv4.

Fixes https://github.com/flutter/flutter/issues/9813
2017-05-04 19:35:59 -07:00
Ryan Macnak
1084a83f11 AOT for Fuchsia. (#3570) 2017-04-11 14:53:14 -07:00
Jason Simmons
29f289acbb Remove dart:jni (#3546)
Fixes https://github.com/flutter/flutter/issues/9129
2017-03-31 13:07:52 -07:00
Jason Simmons
e5442c96ae Return an error to Dart when spawning an isolate with an unsupported URI (#3443)
Fixes https://github.com/flutter/flutter/issues/8084
2017-02-24 09:44:36 -08:00
Dan Rubel
481049f9cd add kernel support (#3369) 2017-02-16 10:11:38 -05:00
Jason Simmons
e70d3ea1df Enable some new Dart VM features (#3408)
Fixes https://github.com/flutter/flutter/issues/7579
2017-02-10 12:28:41 -08:00
Zachary Anderson
f2866146a7 Properly return VM service assets on Fuchsia. (#3406)
In a previous change I re-included the observatory assets in the Fuchsia build, but didn't notice this bit here.

After this, if Settings::enable_observatory can be set to true somehow, the Observatory will come up in Flutter apps on Fuchsia. Unfortunately, I'm not sure how to do that.
2017-02-09 15:18:35 -08:00
Chinmay Garde
9053b6c0ab Allow running in debug product mode with checked mode off. (#3398) 2017-02-07 17:01:27 -08:00
Ryan Macnak
adef37080f Adapt to refactoring of snapshot APIs in the Dart VM. (#3354)
Adapt to refactoring of snapshot APIs in the Dart VM.
2017-01-23 12:09:59 -08:00
Chinmay Garde
2fc99153b7 Decorate kDartWriteProtectCodeArgs with FTL_ALLOW_UNUSED_TYPE since it may not be used in all configurations. (#3302) 2016-12-08 16:26:39 -08:00
John McCutchan
5afca375e3 Disable code page write protection in debug mode (#3299) 2016-12-08 15:06:13 -08:00
Todd Volkert
dd17a112c1 Make dylib filename configurable in Info.plist for iOS (#3277) 2016-11-28 19:44:08 -08:00
Chinmay Garde
327d122de9 Disable profiling by default. Allow enabling via --enable-dart-profiling. (#3238) 2016-11-21 11:50:42 -08:00
John McCutchan
a335e25ba3 Disable Dart's profiler in unoptimized builds (#3234) 2016-11-17 10:14:53 -08:00
John McCutchan
54b81419aa Fix profile and release mode isolate spawning (#3191)
Fixes #6496
2016-11-01 21:28:41 +01:00
Adam Barth
63e71803de Unlink from mojo (#3187)
After this patch, we no longer link with Mojo. We still use some gn definitions
from //mojo to create Dart packages.
2016-10-28 15:01:07 -07:00
Adam Barth
4b8c9051e5 Remove last mojom interface (#3184)
We no longer use mojom to transport messages. We still use the Mojo EDK
to spin the event loop, however.
2016-10-28 11:46:57 -07:00
mikejurka
aed8353b89 Don't enable checked mode for Fuchsia release builds (#3173)
Temporary until precompiled code works on Fuchsia
2016-10-25 14:31:17 -07:00
Ryan Macnak
8303461914 Roll Dart VM. (#3167) 2016-10-24 12:32:10 -07:00
Todd Volkert
f07c32d247 Rollback 28c29b32a8 (#3155) and b6b927ac04 (#3156) (#3163)
iOS debug builds are broken - we need to go back to a stable state
so we can issue a proper fix without rushing into anything.

https://github.com/flutter/flutter/issues/6458
2016-10-21 12:55:26 -07:00
Ryan Macnak
b6b927ac04 Adapt to vm isolate and isolate snapshot pieces being emitted as assembly. (#3156) 2016-10-20 12:11:15 -07:00
John McCutchan
da488fe303 Fix isolate spawn when running from source (#3041) 2016-09-21 07:55:55 -07:00
Chinmay Garde
a55fa1efb9 Add a —disable-observatory flag to explicitly disable observatory even in non-product modes. (#3012) 2016-09-09 15:54:07 -07:00
Chinmay Garde
23dabd4b70 Remove the enable_observatory instance variable from blink::Settings. (#3011)
We used to be able to toggle observatory via a command line flag. But now, we enable or disable observatory based on the Flutter product mode.

This also allows us to fix an issue where the —non-interactive flags was being hijacked by the Dart initialization logic to enable or disable observatory. However this flag was orignally meant for the standalone runner to launch either to run tests or to run a full graphics enabled window on the desktop.
2016-09-08 16:35:30 -07:00
Adam Barth
ca17c1cf76 Introduce UnzipperProvider (#3004)
This patch abstracts where the content of the zip file is stored.
Currently, zip files are stored in the file system, but in Fuchsia,
we're going to store them in memory (at least for the time being).
Rather than represent a zip file as a path in the file system, we
instead use an UnzipperProvider, which can create zip::UniqueUnzipper
objects on demand.
2016-09-07 00:22:27 -07:00
Chinmay Garde
0f87eabd3c Remove support for the —enable-checked-mode flag from the engine. (#2987) 2016-08-31 09:46:05 -07:00
Chinmay Garde
cdff6fa306 Respect the —enable-checked-mode flag when not running precompiled code instead of defaulting it on. (#2986) 2016-08-30 16:25:51 -07:00