22 Commits

Author SHA1 Message Date
Adam Barth
638c182366
[fuchsia] zx::vmar::map migration (#22003)
The new map() method receives its arguments in the same order as the
underlying C system call. This patch should not change any behavior.
2020-10-20 21:59:46 +00:00
Chris Bracken
16b900b63e
Prefer C++ standard headers to their C counterpart (#21091)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
2020-09-11 17:10:00 -07:00
Filip Filmar
fe70fc74a0
[fuchsia] Use dart::ComponentContext() (#17876)
This functionality is added in issue #41523.  Allows runners to request
the singleton instance of `sys::ComponentContext`, while it remains also
accessible to component-specific code that does not have direct access
to top-level objects.

Fixes #41523
2020-04-30 13:27:57 -07:00
Filip Filmar
23dff31a38
[runner] Corrects logging of close() status (#16698)
close() returns a nonzero in case of an error.  Old code had it log
only when *no* error happens on close, which is exactly the opposite
of what we want.
2020-03-25 16:31:46 -07:00
Drew Fisher
fb841071c2
fuchsia: remove use of replace_as_executable (second try) (#17313)
On Fuchsia, we can now get executable VMOs from trusted backing
filesystems.  This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.

By moving the responsibility for executability into the filesystem, we
are able to remove `deprecated-ambient-replace-as-executable` from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).  It wasn't abundantly clear
whether .cmx files for tests were used purely in AOT runtime
environments or also saw JIT usage, so I left those as-is.

For context: this is a second attempt at #16690, which was reverted
because it broke the Dart JIT runner.  The primary difference is that
this time around, we correctly handle absolute vs relative paths,
depending on whether library loading bottoms out in `fdio_open_fd` or
`fdio_open_fd_at`.  I've added additional assertions to help ensure any
new usages use the correct shape of path.

Testing: I verified locally that the flutter product runner works on
Astro, and also successfully ran the Dart JIT example test (which was
the thing blocking the google3 roll with the previous attempt at this
patchset).

Co-authored-by: Drew Fisher <zarvox@google.com>
2020-03-25 13:17:28 -07:00
Kaushik Iska
a16d97e507
Revert "fuchsia: remove use of replace_as_executable (#16690)" (#16829)
This reverts commit ff921cd608efaf3aecd3e3e0feb14bb540cc22ed.
2020-02-27 10:13:26 -08:00
Drew Fisher
ff921cd608
fuchsia: remove use of replace_as_executable (#16690)
On Fuchsia, we can now get executable VMOs from trusted backing
filesystems.  This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.

By moving the responsibility for executability into the filesystem, we
should be able to remove deprecated-ambient-replace-as-executable from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator).

Test: verified locally that this works on Astro on a _user build with
the runtime allowlist tightened.
2020-02-25 13:24:07 -08:00
George Wright
f5de1acf94
Revert "Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (#15118)" (#16277)
This reverts commit 41e8ed071454cfd9ae02e34198250dea0edab9c4.
2020-01-30 17:19:13 -08:00
George Wright
41e8ed0714 Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (#15118) 2020-01-23 18:54:49 -08:00
George Wright
69bc783016
Revert "Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (#15118)" (#15903)
This reverts commit a50f1ef56a05999bfa97a777cca14fd7a00e8454.
2020-01-22 20:35:41 -08:00
George Wright
a50f1ef56a
Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (#15118) 2020-01-07 19:24:45 -08:00
Filip Filmar
29998f07fa Configures ICU to load the timezone data (#13952)
The timezone data in Fuchsia is at a fixed path. This will have the
flutter runner attempt to load it and log, but not fail if loading
does not work out.

Added two tests

(1) Shows that the specific TZ data version loaded takes effect after
initialization

(2) Shows that when TZ data files are absent the initialization
continues.
2019-12-05 17:32:55 -08:00
Kaushik Iska
6fcd795b4c
[flutter_runner] Refactor thread_application pair to ActiveApplication (#12573) 2019-09-27 13:38:25 -07:00
Kaushik Iska
725dc259cd
[flutter_runner] Move from runner context to component context (#12346)
* [flutter_runner] Move from runner context to component context

* remove the file references
2019-09-18 17:45:46 -07:00
Jason Simmons
bfa43e1792
[flutter_runner] Generate symbols for the Dart VM profiler (#12048)
Ported from the original implementation in the Topaz tree.
2019-09-10 14:35:42 -07:00
Konstantin Pozin
70de3ec2c3 [fuchsia] Migrate from custom FuchsiaFontManager to SkFontMgr_fuchsia (#10700)
Use Skia's own implementation of SkFontMgr for Fuchsia, for consistency with
other Skia clients on Fuchsia.

FL-290
2019-08-09 11:04:43 -07:00
Chris Bracken
37a283765c
Migrate Fuchsia runners to SDK tracing API (#10478)
Migrates the Fuchsia Flutter and Dart runners off the internal tracing
APIs and onto the public SDK.
2019-08-06 11:26:34 -07:00
Chris Bracken
0ea826d720 [dart/flutter_runner] Copy package.resolved_url for TRACE_DURATION
Ensure that the string data backing package.resolved_url is not modified
or moved by making a copy to pass as the argument value for
TRACE_DURATION.

PT-169 #comment

Change-Id: I1ef6ab9b1ecf350e82134d1d616a841611ac19c6

Ported from Topaz tree.
2019-06-28 17:40:00 -07:00
Zachary Anderson
0a2e28d797
Revert tracing changes (#9296)
* Revert "[fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (#9289)"

This reverts commit f80ac5f571479053b134e60bca77603269b2ce2a.

* Revert "Align fuchsia and non-fuchsia tracing (#9199)"

This reverts commit 78265484623037c6544dfd5380367bca29fa27b0.
2019-06-12 10:25:49 -07:00
Dan Field
7826548462
Align fuchsia and non-fuchsia tracing (#9199) 2019-06-05 15:14:27 -07:00
Chris Bracken
0f1ff3bdb3
Correct typos, adopt US spellings (#9081)
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
2019-05-25 13:14:46 -07:00
Chinmay Garde
21ad7f051c
Move the Fuchsia Flutter Runner to //flutter/shell/platform/fuchsia/flutter (#8939)
This makes room for the Dart runner at //flutter/shell/platform/fuchsia/dart.
2019-05-12 14:29:34 -07:00