* Allow specifying both Dart and non-Dart fixtures in engine unittests.
This fixes numerous issues in the way in which fixtures were managed
in the engine unit-tests.
* Instead of only being able to specify Dart fixtures, unit-tests may specify
non-Dart fixtures as well. These are simply copied over to the fixtures
directory known to the unit-test at runtime.
* An issue where numerous Dart files could be given to the kernel snapshotter
has been addressed. It was anticipated that such a (legal) invocation to the
kernel snapshotter would produce a snapshot with the contents of all the Dart
files added to the root library. This is incorrect and the behavior in this
case is undefined.
* Dart files referenced by the main Dart file are correctly tracked via a
depfile.
* The snapshotter arguments have been cleaned up to get rid of unused
arguments (`—strong`) and the use of the VM product mode argument has been
corrected to no longer depend on the Flutter product mode.
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.
Made use of `misspell` tool:
https://github.com/client9/misspell
The sticky error may be set in cases such as an unhandled asynchronous
exception. This is similar to the logging done in the Dart command line
embedder's isolate shutdown callback.
The GetMapping calls removed in this patch had the same code and had to be repeated across different test harnesses as well as in dart_snapshot.cc. Just make this a factory method so the code is less verbose.
This reverts commit 1c06891c101f530c1f46337b457ba02e0f6c8633.
Windows depends on referencing the snapshot symbols directly instead of
via dlsym. Something in the way these symbolsa are generated in
bin_to_assembly.py is causing them to be inaccessible at runtime.
`//flutter/runtime: runtime_lifecycle_unittests` was added because the these assumed that there was no VM already running in the process. Running other tests in the base target would mess up that assumption. Now that all test targets have been updated to make sure the VM instance does not leak, the tests in this target can be merged.
LUCI bots don’t need to be patched as these tests were only ever run on the trybots.
There is a possibility for a VM launch to not have a requisite shutdown if a previous launch asked to leak the VM instance in the process. Embedders have to ensure (via their Embedding APIs) that all instances of VM launch use consistent settings.
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
* Fixed service isolate not being initialized correctly due to bad name
The name for the service isolate was being set to the empty string,
causing the microtask loop to not be run on the service isolate leading
to the service hanging on the first 'await'. See
https://dart-review.googlesource.com/c/sdk/+/97107 for revert due to
this issue.
* Removed unnecessary params from DartCreateAndStartServiceIsolate
Link dart:* sources into engine for debugger source support
Currently, dart:* libraries appear to have no source in
debuggers like Observatory. With this change, these sources will be
available in debug mode applications. Sources for dart:* libraries are
lazily loaded on a script-by-script basis.
Refer to https://dart-review.googlesource.com/c/sdk/+/93375 for the Dart
SDK change.
The shell was already designed to cleanly shut down the VM but it couldnt
earlier as |Dart_Initialize| could never be called after a |Dart_Cleanup|. This
meant that shutting down an engine instance could not shut down the VM to save
memory because newly created engines in the process after that point couldn't
restart the VM. There can only be one VM running in a process at a time.
This patch separate the previous DartVM object into one that references a
running instance of the DartVM and a set of immutable dependencies that
components can reference even as the VM is shutting down.
Unit tests have been added to assert that non-overlapping engine launches use
difference VM instances.
This reverts commit 524a12d0468e1a536d74f866796e1cdd7ccaa35e.
Reason for revert: broken in AOT mode.
@pragma('vm:entry-point') placed on a function only instructs
the compiler to retain the function itself, but does not tell
compiler to generate and retain tear-off for this function.
In this PR _runMainZoned was marked as an entry-point but C++
code was trying to tear it off and use a closure, instead of
invoking it directly, which is not supported.