This partially reverts https://dart-review.googlesource.com/c/sdk/+/154180.
The main mechanism for setting domain policy is still useful as we will
use this to avoid insecure connections for higher level protocols (such
as HTTP and gRPC).
We already knew Android does not enforce network policy at socket level
but it turns out iOS does not as well:
> ATS doesn’t apply to calls your app makes to lower-level networking
> interfaces like the Network framework or CFNetwork. In these cases,
> you take responsibility for ensuring the security of the connection.
This also resolves the need to fix
https://github.com/dart-lang/sdk/issues/43223 as we are no longer
enforcing the policy at socket level.
Change-Id: I3913da8ea39dac2c5a70fdabe442775b18cfd0c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Mehmet Fidanboylu <mehmetf@google.com>
after startup
It's possible for VM service clients to request information about
isolates before they've been marked as runnable. Updated the assert to
allow for the kNone service event to handle this case.
Fixes https://github.com/dart-lang/sdk/issues/43170
Change-Id: If03d9f6659714408381d5d2e9f9b1d75a83e82a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161761
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
I added several tests. I also renamed most of the tests to remove a
component that was redundant with the class name after my previous
reorganization of the tests. Unfortunately this will probably make it
fairly difficult to see what changed. No test coverage was lost, so it
might be easier to just look at the new version of the file.
Change-Id: I5a1c9ce6e062f9520631a9ec4a9cfc34141bf2c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161663
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This CL addresses two problems, which only reveal themselves when
analysing snapshots produced when function dropping is enabled.
When tests for snapshot analysis were written functions were dropped
in PRODUCT build by default - by currently this functionality needs
to be enabled separately or is automatically enabled when DWARF stack
traces are enabled. This CL changes test suite to enable DWARF stack
traces.
* When constructing ProgramInfo from V8 snapshot profile we should
not assume that Function nodes have any fields outside of owner_,
because Function node might be artificial and thus have no real
fields except for owner link.
* When writing V8 snapshot profile we should take care not to call
CreateArtificalNodeIfNeeded inside TraceStartWritingObject scope,
because CreateArtificalNodeIfNeeded might itself call
TraceStartWritingObject and these calls don't nest, the second one
overwrites the first one.
R=sstrickl@google.com
Bug: b/167601345
Change-Id: I40879ee087c38992388776af58b81bbefd147631
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161703
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Makes the synthetic sync* iterator dynamic to allow the internal,
synthetic sync* code to handle nested iterators of differing types.
Bug: https://github.com/dart-lang/sdk/issues/42234
Change-Id: I309885b27555142cd7f8ab13a5637b35545f1d44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160071
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Actuallly generate null SDK hash in version.cc when verify_sdk_hash
is set to false. Previously it also required setting dart_version_git_info
to false.
R=cskau@google.com
Change-Id: Ib81757c898507029c499c7c3fa17a86b3375d25b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161701
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Experiments can now be enabled in the experiment release version
using --enable-experiments (and not just through allowed_experiments.json).
Change-Id: Ic83aac6b2a342bb9d6e43ecc5475234e04d1dd7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161503
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
- Move expression evaluation to ddc in preparation for google3
- Added server to ddc to handle update and compileExpression requests
- Added tests
- Added 'experimental-output-compiled-kernel' option to ddc to generate
full kernel files only for compiled libraries, and store with
'.full.dill' extension
- Added AssetFileSystem to communicate to the asset server in the
debugger
- Made expression_compiler_worker work with full kernel files,
so removed invalidation of current file to improve performance
- Made expression_compiler_worker reuse already loaded imports
to avoid reading them from source in the incremental compiler
- Updated tests to work with DDC (for simulating webdev)
- Disabled tests that work with bazel kernel worker for now
as it does not generate full dill files yet
- Addressed code review comments from the prototype version:
https://dart-review.googlesource.com/c/sdk/+/157005
Details:
Currently, in flutter tools, expression evaluation is supported via
expression compilation, which is done by the incremental compiler in
the frontend server. The same incremental compiler is used for initial
application compilation, incremental code compilation for hot reload,
and any number of expression compilation requests.
In google3, the apps are typically too large to be compiled as a whole
in memory by the frontend server. Build in google3 is currently done by
blaze, as a distributed build using a task dependency graph. Build tasks
output kernel outline files as an interface between components produced
by individual tasks.
We are proposing an implementation of the expression compilation in
google3 that is taking advantage of full kernel files produced by the
build (supporting build changes to follow). This change introduces a
small server based on dev_compiler, which can handle following requests:
- update: load full kernel for given modules (done on app start)
- compileExpression: compile expression in a given library and module
(done when paused on a breakpoint)
Expression compilation uses previously loaded kernel files for the
application component and its dependencies to compile an expression.
Change-Id: Icf73868069faf3a2eb6d43ba78e459f8457e9e35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160944
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
This is a reland of d833f2f65c
Original change's description:
> Flow analysis changes to fix mixed-mode unsoundness loophole.
>
> This is the flow analysis portion of the fix to
> https://github.com/dart-lang/language/issues/1143. Follow-up changes
> will be needed in the CFE and/or backends to ensure that exceptions
> are thrown under appropriate circumstances.
>
> This CL also makes some improvements to flow analysis's reachability
> analysis so that it accounts for nullability of the target when
> analyzing the reachability of `??=` and `?.`. Hopefully these
> improvements should make the fix to
> https://github.com/dart-lang/language/issues/1143 clearer and more
> consistent.
>
> Change-Id: I5fa5c070f13fd57ac4c2fb87f2d67588861594b0
> Bug: https://github.com/dart-lang/language/issues/1143
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160440
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>
Bug: https://github.com/dart-lang/language/issues/1143
Change-Id: If9c45649c1e9f4b19f7c282e7a1c4c956a7bc17f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161622
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Tests which depend on the import can merely use Completer instead of
Future to get the same result. Tests which do not rely upon the import
have had the import removed.
Change-Id: I74641a58b1f97c8599c8faad86943b1c68508980
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161625
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit 34f636ce1d with the fix for the typo in patchset 2.
Change-Id: I419528f866f6edb707ca586f21a2a8c7f09323d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161620
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This introduces the concept of temporary analysis roots, used to ensure loose files that are opened can be analyzed even when there are no other analysis roots (and therefore no existing analysis drivers).
Fixes https://github.com/Dart-Code/Dart-Code/issues/2764.
Change-Id: I6b208f7c2fe8b538d7254691221fb72604ef156e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161500
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>