Commit graph

71281 commits

Author SHA1 Message Date
Leaf Petersen 7aace6fa60 Make StackTrace generally not nullable in migrated NNBD library.
Bug: https://github.com/dart-lang/sdk/issues/40130
Change-Id: I13aba0c2a3fa5b1c3d3995f075ffd38f03aca897
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139880
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-19 23:31:30 +00:00
Devon Carew 3f8366363b [nnbd migration] move the docs for the NNBD migration tool
Change-Id: I932da23be10839b5bde6034f120763c54f63889f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140102
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-19 23:12:24 +00:00
Zichang Guo e91e09d1e4 Revert "[dart:io] Fix hanging on zero-length datagram"
This reverts commit c326c587c5.

Reason for revert: Analyzer and Co19 test is broken.

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8885365974080167440/+/steps/test_results/0/logs/new_test_failures__logs_/0

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8885364415750725248/+/steps/test_results/0/logs/new_test_failures__logs_/0

Original change's description:
> [dart:io] Fix hanging on zero-length datagram
> 
> This is observed on Win and Linux.
> Here is a doc to explain the problem: https://docs.google.com/document/d/1ZzyBUMrDHLU6vNryjgSMJfUruOdpmTImtE_s2E0J8IQ/edit?usp=sharing.
> 
> Bug: https://github.com/dart-lang/sdk/issues/39910
> Change-Id: Ia961239f45615f14108bcd66043ac33d9a0a4abe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137425
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=sortie@google.com,lrn@google.com,zra@google.com,asiva@google.com,zichangguo@google.com

Change-Id: Id84a7cafbc14d6353fa6af8e294e8b0c751a969f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/39910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140009
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-03-19 23:05:59 +00:00
Konstantin Shcheglov 532f43dcb2 Stop clearing evaluationResult for ConstVariableElement(s).
This was causing constant errors in _fe_analyzer_shared

With summary2, after https://dart-review.googlesource.com/c/sdk/+/109460
we infer types of fields and field formal parameters together, so
https://github.com/dart-lang/sdk/issues/35940 does not happen.

Change-Id: I3d8532fa938f4942d971d8f9055c8f0f50f482df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140001
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 23:04:19 +00:00
Brian Wilkerson a5c2d2aa71 Add new relevance support to the OverrideContributor
I couldn't think of any useful features to use when ranking overrides. I
briefly considered `deprecated`, but even deprecated members might need
to be overridden until all implementation of the member can be deleted.

Change-Id: I994d4177b1111ebdf44a223f975422779c5a8ae8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140005
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 22:48:39 +00:00
Liam Appelbe 1a86f79198 [test] Fix some nits in strong mode mirror tests
Bug: https://github.com/dart-lang/sdk/issues/40968
Change-Id: I0c89352fbb53d0d76fbeba8dd177af5202593b18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140161
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-03-19 22:29:56 +00:00
Konstantin Shcheglov 09f08bff8b Give 'filename' to attachment MultipartFile(s).
Apperently just field is not enough to show attachments are files.

Change-Id: I42089d25d7055aa81d79ea2dfd621ad1be742b69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-03-19 22:14:59 +00:00
Ryan Macnak 8fc486fb48 [observatory] Remove use of the default List constructor.
This constructor will be broken in Dart 3.

Change-Id: I8c11a862ba55bb1310d87c66e6ce5c3d85825b88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140004
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-19 22:11:39 +00:00
Zichang Guo 36496047b4 [dart:io] avoid http smuggling
Vulnerability problems in http.

1. Double Content-Length is allowed currently. Reject if Content-length has been written.

2. An int is use to record the size of chunk size(for chunked encoding). When int overflows, it represent a wrong number.

3. Content-Length and Transfer-Encoding header should not appear together.

4. Add a 8K size limit when parsing "method", "URI","Header field" and "Header value".

Bug: https://b.corp.google.com/issues/150476984, https://github.com/dart-lang/sdk/issues/25390
Change-Id: Id4a81093a86f090cd1047aff8817dcfec3aa3ec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138266
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-19 21:02:38 +00:00
Brian Wilkerson 63738baa4b Add relevance support to InheritedReferenceContributor
Change-Id: Ib5d518034a766de369da3b5bad1bc0ce1cb8cda4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140145
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 20:56:58 +00:00
Brian Wilkerson ce67d6ae27 Consolidate relevance tests into a single directory
Change-Id: Iee3a3553b17d2e8b3b6f479159e6fe560e44192f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140120
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 20:51:38 +00:00
Liam Appelbe 347793ec70 [vm] Fix a bug in required param function subtyping
I missed an edge case in the subtyping rule. If the this function
has a required param, and the other function is entirely missing
that param, then we would mistakenly call that a valid subtype.

language/nnbd/required_named_parameters/required_named_args_strong_test
found the bug. This test is now passing in strong mode.

Bug: https://github.com/dart-lang/sdk/issues/40968
Change-Id: Ica13bcf4d287e13050f81652e07dcc40c155a801
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140143
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-03-19 20:37:38 +00:00
Joshua Litt a680dd8b1d [dart2js] Make switch_equals_test nnbd.
Change-Id: I10d0c6b7c2de3b151978ce38a060694fef5b895c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139947
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-19 20:34:28 +00:00
Zichang Guo c326c587c5 [dart:io] Fix hanging on zero-length datagram
This is observed on Win and Linux.
Here is a doc to explain the problem: https://docs.google.com/document/d/1ZzyBUMrDHLU6vNryjgSMJfUruOdpmTImtE_s2E0J8IQ/edit?usp=sharing.

Bug: https://github.com/dart-lang/sdk/issues/39910
Change-Id: Ia961239f45615f14108bcd66043ac33d9a0a4abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137425
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-19 20:23:08 +00:00
asiva a980fb1849 [Tests/NNBD] - Migrate initial set of isolate tests for NNBD.
Fix all warnings/errors when running with --enable-experiment=non-nullable flag

Change-Id: I7673aa34466273d623f7a429d96b0ccd6b612dae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139980
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-03-19 20:07:58 +00:00
Stephen Adams 37d1d69f61 [dart2js] Remove _CastError and Rti._check
CastError is deprecated and _TypeError now implements CastError, so
it is possible to remove the distinction in generated code.

All checks now go via Rti._as(x) to some _asXXXX method.

Change-Id: I4ce6735b6c904bcbc366de92ed149716caf9ae81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139959
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-19 18:43:33 +00:00
Sam Rawlins a225178919 Trim not useful bottoms off of the non/nullability stack traces
Change-Id: I2f7bfab13fd3d70c5cbdbb10ce14a8a91f8c7a60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140000
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-03-19 18:13:33 +00:00
Liam Appelbe 318b42572e [vm] Mark member signatures as not reflectable
This fixes some mirrors failures in NNBD legacy mode, since the CFE is
inserting more synthetic functions now, to handle interfacing between
libraries with different NNBD status.

Change-Id: Iad5cb2548ef118f842bf2eadf249d4dca9f38fa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139740
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-03-19 17:54:19 +00:00
Joshua Litt b0221e691d [dart2js] Drop nullability when checking for simple types.
Change-Id: I69b32889b60d79ebf2ce6286d8315c38274152f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139681
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-19 16:35:39 +00:00
Ryan Macnak 23792e7816 [vm] Require explicit loads and stores when using AcqRelAtomic.
Change-Id: I19d64667cea7dd735c3bf7194285383289019aaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139942
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-19 16:19:59 +00:00
Brian Wilkerson dcdde433b6 Use the deprecated feature for static members
Change-Id: I718a30d9c392ebae2fe611b402c13cdb60a90825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140080
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 16:09:59 +00:00
Ryan Macnak a1563c2cb6 [vm] Fix data race on BackgroundCompiler::running_.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: Ieab26d313790d0cda3503c6b6ac30f6c72a76f2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139958
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-19 16:07:59 +00:00
Johnni Winther 6dff390dec [cfe] Compute consolidated supertypes
Change-Id: Ifa2303afd61af184b171f13f5959b0786273cedb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140041
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-03-19 15:26:09 +00:00
Paul Berry 051d51f6be Migration: fix the descriptions of nullability nodes associated with parameters.
Previously, parameters with explicit types just got a description of
"explicit type"; now they get a description like "parameter 0 of
Foo.bar".

Change-Id: Ia6134fff48bc7d7e628304333f1c6ba406e8bdc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139957
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-03-19 14:45:39 +00:00
Brian Wilkerson 2a2855c781 Perform new relevance computations for extension members
Sorry for the size of the change.

This started out looking like a fairly simple task of repeating the work
done for type mambers, but it was too similar so I ended up doing some
refactoring in order to share the code.

Along the way I realized that we didn't yet have a feature for demoting
deprecated members, so I added it.

Then I discovered some more places where the old and new logic were
getting intertwined, so I straightened that out as well.

Change-Id: Ic24babd30bbbeeae9709a8019642e497a2ebb65d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139949
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 13:34:19 +00:00
Vijay Menon a0e4f0575a Revert "Revert "[dartdevc] record metrics""
Reland with fixes for internal build (patch set 2+)

Change-Id: I5b130d020c9437a2c52dd074ad007e1fef7a8fa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139241
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2020-03-19 13:09:59 +00:00
Dmitry Stefantsov 3b6935f30e [cfe] Report NNBD warnings as errors in strong mode
Closes #40981.

Bug: https://github.com/dart-lang/sdk/issues/40981
Change-Id: I95715ab973a6f09bf7f8b4e090e5a80663cd4861
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139463
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-03-19 11:26:39 +00:00
Paul Berry f2dd2e28f3 Migration: preserve code references for nullability nodes with explicit types.
Previously, when analyzing code like:

  int f() {}

We assigned a NullabilityNodeTarget for `int` that simply said it was
the return type of the element for `f`; the location of `int` in the
source code was lost.  With this CL, we produce the same target, but
we preserve the location information.

Change-Id: Ibfe11485aedf208a39947e5a4903b4fa738e86a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139954
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-03-19 09:03:17 +00:00
Simon Que 35ce88100c [build] GN flag to use relative symlink to Xcode
The flag "mac_use_goma_rbe" creates a symlink to the Xcode SDK
directory, under $root_build_dir/sdk/xcode_links.

e.g. the -isysroot arg in the build command becomes:
  -isysroot sdk/xcode_links/MacOSX10.15.sdk

This is based on a similar solution for Chromium iOS builders:
http://crrev.com/c/1946174
http://crrev.com/c/2102649

Bug: b/151697301
Change-Id: Ie65d3ae2b98da5977ad0f5a75f865c838bbbb963
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139782
Commit-Queue: Simon Que <sque@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-03-19 08:33:17 +00:00
Alexander Thomas 97afe8410a [beta] Support the beta channel in SDK scripts
Fixes https://github.com/dart-lang/sdk/issues/40992

Change-Id: Icc6888c94517667a184931d3e690db2fe67cc0ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139814
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-03-19 07:49:38 +00:00
Stephen Adams afbce123fa [dart2js] Add '--legacy-javascript' flag
dart2js will migrate slowly to modern JavaScript.

The --legacy-javascript flag causes emitted code to be compatible with
IE11, our only supported non-modern target. This is a temporary flag
until IE11 is removed from support.

The negative flag --no-legacy-javascript allows the code to be
incompatible with legacy browsers and, over time, be improved to take
advantage of modern JavaScript features.

Initially --no-legacy-javascript will use some minimal features that
are incompatible with IE11 as a 'trip-wire' to ensure that
--legacy-javascript is always used for IE11.  dart2js analytics can
then be used to assess how much --legacy-javascript is used. (The
'trip-wire' unsupported feature is unguarded use of JavaScript
Symbols.)

The default at this change is --legacy-javascript so that this change
is non-breaking. The default will be changed soon to
--no-legacy-javascript.

Change-Id: Ic13461362a5fa80293fb66b112945d1404a64a03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139867
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-19 02:11:07 +00:00
Ben Konyi d1c8aae6d8 [ VM ] Update lib_2/isolate tests to no longer use package:unittest
Fixes https://github.com/dart-lang/sdk/issues/40799

Change-Id: Ia65221c2a14b9d8e923e394ebc1c35ea5dad4c6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139953
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-19 00:57:26 +00:00
Regis Crelier eca06cd299 [VM/nnbd] Normalize FutureOr<T> when loading kernel file.
CFE does not always normalize FutureOr<T> eagerly, e.g. it does not normalize
FutureOr<Null> parsed in the source. However, it normalizes inference or
instantiation results.
For performance reasons, the VM chooses to do it eagerly, i.e. it must also
normalize unnormalized types from a kernel file.

Change-Id: I5798333ba3c58c5b2851045ef32c345d94f58268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139955
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-03-19 00:19:10 +00:00
Alexander Markov 64b80cd151 [vm/nnbd] Specialize List.filled constructor invocations
With NNBD default List constructor is deprecated.
Instead, List.filled constructor is used to create lists of a particular
length, so List.filled is now used much more often.
This change adds VM-specific specialization for List.filled constructor
invocations when they are used to create lists filled with null.

Fixes https://github.com/dart-lang/sdk/issues/41104

Change-Id: I050549fd550acb8d62997b2b28c1f1e41ad3e0cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139952
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-03-18 23:40:40 +00:00
Regis Crelier 4e75fc1609 [VM/nnbd] Use correct top type in inline code for is-test.
Instantiate with correct nullability and normalization in type testing stubs.

Change-Id: I24a74625d450e2ce1d9cdf23fbfdc1f9983ffdb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139951
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-03-18 23:26:00 +00:00
Ryan Macnak 5b21a43c55 Reland "[vm] Fix CreateWithinExistingIsolateGroup calling RegisterIsolate without a write lock."
Avoid deadlock by not holding the write lock to more than one isolate group at a time.

Bug: https://github.com/dart-lang/sdk/issues/39611
Bug: https://github.com/dart-lang/sdk/issues/41080
Change-Id: I229b2a30da0901c7798c3df89fdf2a9547aae557
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139941
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-18 22:22:09 +00:00
Mark Zhou 84a2f271a3 [dartdevc] Cleaning up required name arg stringification.
Change-Id: Ib10bd1a0d986a3ca4e37000a909be9a2fced5f45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139944
Auto-Submit: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-03-18 21:47:12 +00:00
Paul Berry 75a720f2fb Migration: in preview tool, links in edit details should not clear edit details
Change-Id: I30336e93b9d3d579d1ef8c91d3a21d68b0e4aeb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139946
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-03-18 21:40:02 +00:00
Paul Berry 3b0b0eb6dd Migration: reorder data in "Edit Details" box
This CL moves the "edit rationale" section down to the bottom, and
marks it as "experimental", since it doesn't seem to give as useful
information as the traces.

Change-Id: I5c45c31d9cfcee89bf03b1ef8803f4a59ac180e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139945
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-18 21:24:32 +00:00
Paul Berry 40976c6000 Migration: remove "Nullability trace for" text from preview tool.
It was redundant with the text in the trace description.

Change-Id: I7970cede15fe620440e3a05adb987ea451ac9f16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139943
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-03-18 21:18:22 +00:00
Paul Berry 096bf5769d Migration: add "why not nullable" traces to preview tool.
Change-Id: If945d32f33124e5e85429bd76c1db14167c0024e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139960
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-03-18 21:18:22 +00:00
Paul Berry 41b67a9b52 Migration: add grayed-out spaces to indicate types not being made nullable.
Change-Id: I4fa076693c25cf9466d33332030df3983043ffd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139940
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-03-18 21:18:22 +00:00
Jonas Termansen e725e8edf2 [nnbd] Fix regressions in the standalone/io migration.
Closes https://github.com/dart-lang/sdk/issues/40571.

Change-Id: I38704ab2583f4e856866f091ac652a8a652abe54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137101
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-03-18 20:38:52 +00:00
Zichang Guo d8f5ca49c5 [dart:io] webSocket pingInterval doesn't close the connection
pingInterval api pages says, when pong is not received on time, the connection will be closed. But our implementation didn't follow the description.

Bug: https://github.com/dart-lang/sdk/issues/39469
Change-Id: Ic62b8ab0152997ac60b1b836d6a1587d9ce38131
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138760
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-03-18 19:51:19 +00:00
Alexander Markov 941e4e13a0 [nnbd/vm/corelib] Avoid extra call in identityHashCode
Fixes https://github.com/dart-lang/sdk/issues/41087

Change-Id: I6b48ebc96f21a587c0f95b22530a6019a92ad649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139864
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-18 19:16:53 +00:00
Nicholas Shahan a5704eaca3 [dartdevc] Throw TypeError instead of CastError
Remove all `_check()` calls as they are now identical to `as()`.

Fixes: #41008
Change-Id: I4e4dd1ff50840d3d1cbf0aae9b8cef0621016079
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139490
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-18 18:39:26 +00:00
Alexander Markov 584914b33c [nnbd/corelib] Remove unnecessary polymorphism in SplayTreeNode
Fixes https://github.com/dart-lang/sdk/issues/41064

Change-Id: I144265410ee92ba5df93cc0cf9ad1692da165b17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139748
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-03-18 18:35:46 +00:00
Zichang Guo 6a5b87f92c [dart:io] Stop accessing http header with _add()
Several places adds HttpHeader with _add() instead of public add(). This skips some validation checks.

Bug: https://github.com/dart-lang/sdk/issues/40905
Change-Id: Ifcb16fcd40fb93914540f6bf09f476f621c36e15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138860
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-03-18 18:10:55 +00:00
Jaime Wren 784b17dd24 Fix the output when running dart help pub.  Process.runSync(..) is used since printUsage() is not an async method.
Bug: https://github.com/dart-lang/sdk/issues/41040
Change-Id: I9e4fbab333bbd67dcab2b1e0752fc0debb80be46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139833
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-03-18 18:05:26 +00:00
Ryan Macnak 9a140bab87 [vm] Use acquire-release ordering to publish and consume the class table backing arrays.
Change-Id: I57a3109b3ba42e1addf97c15c5d8108cd0338266
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139860
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-18 17:18:55 +00:00