26 Commits

Author SHA1 Message Date
Chris Bracken
49c35b6177
Eliminate unnecessary linter opt-outs (#21935)
Eliminates FLUTTER_NOLINT where they can be landed without triggering
lint failures.
2020-10-16 17:24:23 -07:00
Chinmay Garde
5bd7260a1e
Enable loading snapshots with sound null safety enabled. (#21820)
Snapshots compiled with sound null-safety enabled require changes to the way in
which isolates are launched. Specifically, the `Dart_IsolateFlags::null_safety`
field needs to be known upfront. The value of this field can only be determined
once the kernel snapshot is available. This poses a problem in the engine
because the engine used to launch the isolate at shell initialization and only
need the kernel mappings later at isolate launch (when transitioning the root
isolate to the `DartIsolate::Phase::Running` phase). This patch delays launch of
the isolate on the UI task runner till a kernel mapping is available. The side
effects of this delay (callers no longer having access to the non-running
isolate handle) have been addressed in this patch. The DartIsolate API has also
been amended to hide the method that could return a non-running isolate to the
caller.  Instead, it has been replaced with a method that requires a valid
isolate configuration that returns a running root isolate. The isolate will be
launched by asking the isolate configuration for its null-safety
characteristics.

A side effect of enabling null-safety is that Dart APIs that work with legacy
types will now terminate the process if used with an isolate that has sound
null-safety enabled. These APIs may no longer be used in the engine. This
primarily affects the Dart Convertors in Tonic that convert certain C++ objects
into the Dart counterparts. All known Dart Converters have been updated to
convert C++ objects to non-nullable Dart types inferred using type traits of the
corresponding C++ object. The few spots in the engine that used the old Dart
APIs directly have been manually updated. To ensure that no usage of the legacy
APIs remain in the engine (as these would cause runtime process terminations),
the legacy APIs were prefixed with the `DART_LEGACY_API` macro and the macro
defined to `[[deprecated]]` in all engine translation units. While the engine
now primarily works with non-nullable Dart types, callers can still use
`Dart_TypeToNonNullableType` to acquire nullable types for use directly or with
Tonic. One use case that is not addressed with the Tonic Dart Convertors is the
creation of non-nullable lists of nullable types. This hasn’t come up so far in
the engine.

A minor related change is reworking tonic to define a single library target.
This allows the various tonic subsystems to depend on one another. Primarily,
this is used to make the Dart convertors use the logging utilities. This now
allows errors to be more descriptive as the presence of error handles is caught
(and logged) earlier.

Fixes https://github.com/flutter/flutter/issues/59879
2020-10-16 14:53:26 -07:00
Chris Bracken
08dabe9601
Clean up C++ includes (#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Mehmet Fidanboylu
dd2c5a1b8b
Plumbing for setting domain network policy (#20218) 2020-08-13 07:26:43 -07:00
Mehmet Fidanboylu
47a88e8ea3
Add support for setting allow http flag in Dart VM (#17653) 2020-04-11 11:55:05 -07:00
Chinmay Garde
f7b78e001d
Remove all uses of the redundant flutter_root variable. (#16311)
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
2020-01-31 21:49:48 -08:00
Chinmay Garde
276481c4d3
Move tonic into //flutter/third_party. (#15895)
Tonic used to be used by multiple consumers outside of Flutter Engine. Due to
this, it has an unnecessary abstraction layer as well as utilities duplicated in
FML and other engine subsystems. The sole user of Tonic is now the Flutter
Engine. It is intended that the Flutter Engine team now owns this subsystem,
remove unnecessary utilities and document the headers. This is the first step in
the transition. No history is being imported as the initial history was already
lost in the transition of this component to fuchsia.googlesource. As this
component was unmaintained there, I could see no additional value in importing
the history of the patches there.

No functional change. Just moved the repo from //third_party to
//flutter/third_party and updates GN refs.
2020-01-25 17:01:56 -08:00
Matthew Dempsky
4688dc7700 Remove unnecessary DartIO::EntropySource wrapper (#8635) 2019-04-18 17:15:04 -07:00
Chinmay Garde
eec74e5c92
Rename the blink namespace to flutter. (#8517)
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.
2019-04-09 12:44:42 -07:00
Ryan Macnak
64fc583295
Remove use of DART_CHECK_VALID. (#8417)
Bug: https://github.com/flutter/flutter/issues/30407
2019-04-03 10:01:57 -07:00
Michael Goderbauer
70a1106b50
Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Ben Konyi
6f8c827b25
Dart SDK roll for 2018-09-28 (#6388) 2018-09-28 18:02:04 -07:00
Chinmay Garde
9f8285ac6c
Remove all dependencies on Garnet. (#5869) 2018-07-26 12:49:34 -07:00
Jason Simmons
0bad812c72
Migrate to a standalone Tonic repository separated from Topaz (#5817) 2018-07-23 11:49:35 -07:00
P.Y. Laligand
6fcb45991d Move //dart to //third_party/dart. (#4245) 2017-10-19 01:20:38 -07:00
P.Y. Laligand
5fae5d52cf Allow the project to be mapped to a location other than //flutter. (#4203)
This is for Fuchsia where we would like it to be located at //third_party/flutter.
2017-10-13 17:00:58 -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
P.Y. Laligand
fc3cb8fb3b Adjust to new location of lib/tonic. (#4132) 2017-09-21 14:30:28 -07:00
George Kulakowski
6502090278 Fix remaining ftl->fxl conversions (#4091)
* 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
2017-09-11 16:31:18 -07:00
George Kulakowski
3aa7522c11 Rename ftl to fxl in Fuchsia specific code (#4090) 2017-09-11 15:58:48 -07:00
Adam Barth
73554a1c32 Add //garnet (#4043)
This repository contains FTL now in the Fuchsia build.
2017-08-31 16:47:13 -07:00
Ryan Macnak
1fed16fb25 Adjust GN for removal of libdart, take two. (#3584)
Update targets only included in host_debug_unopt.
2017-04-11 09:52:54 -07:00
Ryan Macnak
6d4b153ba8 Revert "Adjust GN for removal of libdart. (#3583)"
This reverts commit f5d0004ebd0db95c4019ca27fde2aceb0b3fe3e3.
2017-04-10 17:07:28 -07:00
Ryan Macnak
f5d0004ebd Adjust GN for removal of libdart. (#3583) 2017-04-10 16:42:27 -07:00
Adam Barth
5d13dc00aa Add support for child view on Fuchsia (#3217) 2016-11-10 18:03:00 -08:00
Adam Barth
855e471c1f Almost remove //flutter/tonic (#2916)
All that's left is two task runners, which should be statics somewhere.
2016-08-12 09:42:32 -07:00