Commit graph

8683 commits

Author SHA1 Message Date
Todd Volkert aa2ce7cfbf Add compressionState getter to the HttpClientResponse API.
Bug: dartbug.com/36971
Change-Id: I7dc0b48fe8eddb2f49a73efb9c4c6aba1233179b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102800
Commit-Queue: Todd Volkert <tvolkert@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-05-30 21:57:35 +00:00
Ben Konyi cca2bb317e [ dart:developer ] Exposed reason, errorCode, and errorDetail getters in ServiceExtensionResult.
Fixes issue #36163.

Change-Id: I33b8324e9c16fb12e80dd91beb275320b64f7316
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103462
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-05-28 18:02:12 +00:00
Régis Crelier 735669190e [corelib BigInt] Fix implementation of BigInt.modInverse (fixes issue #37008).
A negative result was wrongly returned as a positive value.
Since positive values are preferred, the implementation now adds the modulus
enough times to make the result positive.

Change-Id: I87a2ceb359345846740a749ab6b46b1d45e7ba21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103664
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-05-25 22:05:51 +00:00
Jonas Termansen df95340f0c [dart:_http] Fix parsing of empty cookies and double quotes.
Commit a9ad427 introduced a bug that assumed the cookie value was at least
one character, but the cookie value can also be empty.

RFC 6265 5.2 does not specify any special behavior for double quotes and as
such they should be considered part of the value. This change stops
stripping those double quotes and instead preserves them.

The io/http_cookie_test test was skipped because it was considered flaky.
This change dusts it off and tests the new behavior.

This change adds the exact offsets and source to the FormatExceptions to
help the caller understand why a malformed cookie was rejected.

Fixes https://github.com/dart-lang/sdk/issues/33327
Fixes https://github.com/dart-lang/sdk/issues/35804
Change-Id: I3479ba48be5763c485bd3ca5b5d2d86d283df971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/91221
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2019-05-23 10:05:36 +00:00
Volk 93481167a6 Add innerText field to Element class
As mentioned in #28303 Dart needs the innerText getter/setter.

This seems like all thats needed.

Closes #35471
https://github.com/dart-lang/sdk/pull/35471

GitOrigin-RevId: 95f45dd8ba1d0ce58acbeb99242c45b56c586f85
Change-Id: I3514e02915b4c388d6fe2462976e0a88a6081493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100822
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-05-22 14:32:04 +00:00
Kathy Walrath 4fe9951dca Update API homepage to link to dart.dev, not dartlang.org
Closes #37026
https://github.com/dart-lang/sdk/pull/37026

GitOrigin-RevId: 386b573c71dbb7ff22ca0afa344258ee24dd6663
Change-Id: I6e3761bb03220c886f8ee9e379486b7903fb37bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103220
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-05-21 02:51:59 +00:00
Lasse R.H. Nielsen 82c8c78739 Make StreamTransformer(..) transformed stream mimic original's isBroadcast.
BUG= http://dartbug.com/36965

Change-Id: I5dd156a635c1750d136206b030ee71a78b0e2ad3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102369
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-20 12:44:05 +00:00
Todd Volkert 5ffff98440 Add autoUncompress to _HttpClientResponse
Bug: dartbug.com/36971
Change-Id: I5f35c26f705591330d7e777773d5595e0978d3e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102780
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Todd Volkert <tvolkert@google.com>
2019-05-16 20:31:39 +00:00
Jonas Termansen cdabea8fe2 [dart:io] Document raw sockets are not operating system raw sockets.
This change clarifies that dart:io's RawSocket is not an operating system
raw socket, which can be used to access the raw network protocol layer, but
is instead an API for accessing the transport protocol layer.

Closes https://github.com/dart-lang/sdk/issues/36792.

Change-Id: Id7a413184cb878e179778e4b5535abdc5527b270
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100844
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-05-06 15:14:25 +00:00
Liam Appelbe 97122d162e Separate abi versions out from create_sdk into their own target.
Bug: https://github.com/dart-lang/sdk/issues/36820
Change-Id: If9861095f07085e7e88d547cfc052ea033011d4a
Fixes: https://github.com/dart-lang/sdk/issues/36820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101080
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-05-02 22:30:49 +00:00
Lasse R.H. Nielsen 1dd0f88c84 Don't allow null as argument to StreamIterator constructor.
Change-Id: I10c8de2cd12660876908f719ee562006cd3f2c07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98001
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-04-30 13:27:48 +00:00
Stevie Strickland 4028fec3b5 Reland "[vm] Finish adding support for ECMAScript 2018 features."
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: Ie62e6082a0e2fedc1680ef2576ce0c6db80fc19a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100641
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-04-29 09:11:48 +00:00
Keerti Parthasarathy 9238e25305 Revert "[vm] Finish adding support for ECMAScript 2018 features."
This reverts commit 5ebb640a67.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [vm] Finish adding support for ECMAScript 2018 features.
> 
> This work pulls in v8 support for these features with
> appropriate changes for Dart and closes
> https://github.com/dart-lang/sdk/issues/34935.
> 
> This adds support for the following features:
> 
> * Interpreting patterns as Unicode patterns instead of
>   BMP patterns
> * the dotAll flag (`/s`) for changing the behavior
>   of '.' to also match line terminators
> * Escapes for character classes described by Unicode
>   property groups (e.g., \p{Greek} to match all Greek
>   characters, or \P{Greek} for all non-Greek characters).
> 
> The following TC39 proposals describe some of the added features:
> 
> * https://github.com/tc39/proposal-regexp-dotall-flag
> * https://github.com/tc39/proposal-regexp-unicode-property-escapes
> 
> These additional changes are included:
> 
> * Extends named capture group names to include the full
>   range of identifier characters supported by ECMAScript,
>   not just ASCII.
> * Changing the RegExp interface to return RegExpMatch
>   objects, not Match objects, so that downcasting is
>   not necessary to use named capture groups from Dart
> 
> **Note**: The changes to the RegExp interface are a
> breaking change for implementers of the RegExp interface.
> Current users of the RegExp interface (i.e., code using Dart
> RegExp objects) will not be affected.
> 
> Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
> Commit-Queue: Stevie Strickland <sstrickl@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=lrn@google.com,kustermann@google.com,jmesserly@google.com,johnniwinther@google.com,sstrickl@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I1eda0fee4fd9e94df095944049833a67b07277e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100560
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-25 14:29:51 +00:00
Stevie Strickland 5ebb640a67 [vm] Finish adding support for ECMAScript 2018 features.
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-04-24 09:24:16 +00:00
Nicholas Shahan ca9bbd39d5 [dartdevc] Remove ddc and ddk pre-compiled "legacy" sdk modules
We do not expect any client uses of the precompiled SDK in this module format. The only know use
case builds the SDK manually first.

Add simple tests that files can be compiled with `--modules legacy` option.

Issue: #35988
Change-Id: Ie2c4244e5876bb04f968b0198f5763ff3d29c01c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99921
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-04-23 21:29:15 +00:00
Stephen Adams 1ecedb2341 Fix JsLinkedHashMap memory leak
Change-Id: I768de1f8e52c890dfbf8ca214e9e82051b4070fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99885
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-04-19 19:45:31 +00:00
Mayank Patke 919461badd Ensure boolified SSA nodes are non-null first.
Fixes https://github.com/dart-lang/sdk/issues/34147.

The Dart language specification says we should ensure booleans are
non-null in the following (non-exhaustive) situations:
* (ternary) conditional expressions - this includes the `!` operator
since `!x` is equivalent to `x ? false : true`
* arguments to logical boolean expressions (`||` and `&&`), modulo
short-circuiting
* `if` conditions
* `for` loop conditions
* `while` conditions
* `do`/`while` conditions

With control-flow-collections enabled, this CL will also cover
conditions in `if` elements and `for` elements. Tests for these already
exist in
language_2/control_flow_collections/{if,for}_null_condition_test.dart.

Change-Id: I2ce9a30adeb16a0a68411f358f69aeca08656dab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98780
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-10 00:28:10 +00:00
Ben Konyi 15b11b0183 [ VM / Service / Observatory ] The VM service now requires an authentication code by default.
Previously, a valid web socket connection would use the following URI:

`ws://127.0.0.1/ws`

Now, by default, the VM service requires a connection to be made with a
URI similar to the following:

`ws://127.0.0.1:8181/Ug_U0QVsqFs=/ws`

where `Ug_U0QVsqFs` is an authentication code generated and shared by the
service.

This behavior can be disabled with the `--disable-service-auth-codes`
flag.

Change-Id: I288aac58e3ba9d35dca8071f3f7e7a073896c271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98433
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-09 22:57:29 +00:00
James Lin b5545fe067 Add documentation explaining why jsonEncode and jsonDecode exist
(And do the same for `base64Encode` and `base64Decode`.)

Motivated by <https://stackoverflow.com/questions/54859595/>.

Change-Id: I776cb26b7588b3b8a18a2185460477df3a16598b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94986
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: James Lin <jamesdlin@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-04-09 12:50:38 +00:00
Clement Skau 26874860e3 [SDK] Adds .exe extension for Windows binaries in dart_sdk.py.
This fixes the current build breakage:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917013092125339168/+/steps/upload_sdk/0/stdout

Bug: None
Change-Id: Ic47812a5f3ce0ab7f090a3f19429aa5d5e3cb279
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98846
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-04-08 13:22:53 +00:00
Michael Thomsen 3e12bdd717 Update dart2aot help output
Closes #36514
https://github.com/dart-lang/sdk/pull/36514

GitOrigin-RevId: 479b2c21838416d62477879a6d18ff6debb4bf12
Change-Id: If89d1cffb24b6d383bf67b20b6ceb1d1b9fd1f1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98820
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-04-08 10:04:57 +00:00
Alexander Aprelev dbc9ff11bf [vm/vmservice] Switch from const bool.fromEnvironment() to new for 'DART_SERVICE_USE_AUTH'.
This is needed to prevent frontend from attempting to evaluate this constant during compile time.

Change-Id: If6c72f1ab6b3d7e3ea753703e79b388c39fbeca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98698
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-04-05 15:41:11 +00:00
Clement Skau 907c514c89 [SDK] Adds build targets, wrappers and SDK builds for Dart AOT.
Adds:
- dart2aot, a script similar to dart2js which compiles my.dart to my.dart.aot.
- dartaotruntime, a minimal Dart runtime that only runs AOT blobs.
- some extra tooling like gen_kernel and gen_snapshot used by the above.
- build rules for all of the above, including adding it to the full SDK builds.

Bug:https://github.com/dart-lang/sdk/issues/27596
Change-Id: Ic35f832b2b86be959212b8d21cfc5a082da5ced4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97627
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-04-05 13:23:44 +00:00
Ryan Macnak 6d934b94c5 [vm, service] Remove _getCrashDump.
This has been broken since Dart 2.

Bug: https://github.com/dart-lang/sdk/issues/36281
Change-Id: I1b92c079ca3d7720a654c56457fd5aebeb7b8df4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97445
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-02 18:00:49 +00:00
Ben Konyi ac2c934563 Reland "[ VM / dart:isolate ] Added ability to set names for spawned isolates."
This reverts commit 638f13ff3d.

Change-Id: Ib5015539b1c93791c2469be6995789f8f0362806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97845
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-28 16:39:50 +00:00
Stephen Adams f226f4ff24 Improve type of typed-array load
- Typed array elements are never null, but type inference sometimes
  thinks they are.

- Annotated isNan and isFinite as pure.

Change-Id: I5fffd237374444db27665009cf550b26563bcf55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98046
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-03-27 23:22:50 +00:00
Kevin Moore db8dca4fbf dart:core: optional-new/const, named-default-separator, function-typedefs
dartfmt -w --fix-optional-new --fix-optional-const --fix-named-default-separator --fix-function-typedefs .

Change-Id: I9b1d6b8a604384afed0ece35a9a7f849edba46df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97563
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-03-25 19:40:30 +00:00
Kevin Moore a447b36280 convert: remove private typedefs
Change-Id: Ie97da6a9347b6c3a96ae5854c8b7d6ba1be0dba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97354
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2019-03-22 14:27:25 +00:00
Kevin Moore a7a36961bd math: dartfmt -f --fix
Change-Id: I1ffb3c418479903d982f17753e74d264b9341361
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97447
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-03-21 16:02:08 +00:00
Peter von der Ahé 3c2bfa554a Resolve type conflicts in dart:js
Change-Id: I261d6c414014e7682a9ef5555e7194d287aa2ecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97324
Auto-Submit: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-03-20 09:04:53 +00:00
Stevie Strickland af5fc2d4d2 [VM] Partial support for named regexp captures.
See https://github.com/tc39/proposal-regexp-named-groups
for a high-level description of the feature and examples.  This is one of the
features requested in https://github.com/dart-lang/sdk/issues/34935.

This is a partial implementation because while there is a way to retrieve
groups via Dart by name, it requires casting the returned Match to the
new RegExpMatch interface to avoid changing the RegExp interface.
Changing the RegExp interface will happen in a future update, since there
are other planned changes to the RegExp interface coming soon and that way
we only change it once. See https://github.com/dart-lang/sdk/issues/36171
for more details on the planned changes.

Also, since only BMP regular expressions are supported, not full
Unicode ones (i.e., those with the /u flag in ECMAscript), \k<NAME>
will only be parsed as a named back reference if there are named
captures in the string. Otherwise, the \k will be parsed as the identity
escape for backwards compatibility. The new tests illustrate this
difference.

Change-Id: Ieeb0374813db78924c9aa8ac3e652dfb6d4a5934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95461
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-03-19 10:40:15 +00:00
Terry Lucas ae72776312 New DomExceptions added to browsers.
These new exceptions have no legacy values.

DataCloneError - The object can not be cloned.
EncodingError - The encoding or decoding operation failed.
NotReadableError - The input/output read operation failed
UnknownError - The operation failed for an unknown transient reason (e.g. out of memory).
ConstraintError - A mutation operation in a transaction failed because a constraint was not satisfied.
DataError - Provided data is inadequate.
TransactionInactiveError - A request was placed against a transaction which is currently not active, or which is finished.
ReadOnlyError - The mutating operation was attempted in a "readonly" transaction.
VersionError  An attempt was made to open a database using a lower version than the existing version.
OperationError - The operation failed for an operation-specific reason.
NotAllowedError - The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

R=vsm@google.com

Change-Id: I1245bc788fd287d566f42184ebe914165afa95ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97163
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2019-03-18 15:18:25 +00:00
Stephen Adams 7a90563ee3 [js_runtime] Try to avoid String.prototype.replace with replacement patterns
Change-Id: I4b063fe77592bbb0ad9f6ffb628c3bdd6323b20c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-03-15 21:51:15 +00:00
Stephen Adams 9b185051a9 Don't use lazy static initializer in Random.secure()
The lazy static initializer returns null after throwing on the first use.

Change-Id: I44fbb6f8af263dc5c813ed5dff2291fb27e48b4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96984
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-03-15 17:45:06 +00:00
Daco Harkes 638f13ff3d Revert "[ VM / dart:isolate ] Added ability to set names for spawned isolates."
This reverts commit 59525264e8.

Reason for revert: causes Flutter test observatory and protocol to deadlock.
Issue: https://github.com/dart-lang/sdk/issues/36232

Original change's description:
> [ VM / dart:isolate ] Added ability to set names for spawned isolates.
> 
> Fixes issue #34059
> 
> Change-Id: I315498b02edc184e9e408c93eddb78aa1a5a8a1d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90341
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com,sigmund@google.com

Change-Id: I5f2115a2ac394a8d4c7c175bc97f2b88b65fcb49
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97107
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-03-15 14:40:37 +00:00
Ben Konyi 59525264e8 [ VM / dart:isolate ] Added ability to set names for spawned isolates.
Fixes issue #34059

Change-Id: I315498b02edc184e9e408c93eddb78aa1a5a8a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90341
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-14 22:23:09 +00:00
Liam Appelbe e7562917f1 Reland https://dart-review.googlesource.com/c/sdk/+/96500
Rather than creating the abiversions directory during gclient update,
check in an (almost) empty directory. This fixes the flutter build.

Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: Ied74210bfc1c8fda998f58f754eac3949ebe0718
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96846
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-03-13 21:03:01 +00:00
Kevin Moore 8c3f74817e dartfmt -w --fix dart:collection
Change-Id: Ia643bb49fe22150f794a187a71c19ad4c61b5694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96663
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-03-13 13:31:52 +00:00
Liam Appelbe 1db664764a Revert "Copy abi dills in create_sdk build rule"
This reverts commit 49a0502f49.

Reason for revert: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8919160881488492768/+/steps/build_host_debug/0/stdout

Original change's description:
> Copy abi dills in create_sdk build rule
> 
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Change-Id: If73dbe5a62eff54ac0f712dada14ccd4c68c293e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96500
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=rmacnak@google.com,athom@google.com,asiva@google.com,liama@google.com

Change-Id: I90610bc43606a8cb148c9a3d9a1cab532176df8c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96665
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-03-12 20:48:56 +00:00
Liam Appelbe 49a0502f49 Copy abi dills in create_sdk build rule
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: If73dbe5a62eff54ac0f712dada14ccd4c68c293e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96500
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-03-12 20:24:07 +00:00
Scott Hyndman 674fd0e060 Fixes VSCode highlighting of num.dart.
Closing backticks were required.

Closes #36146
https://github.com/dart-lang/sdk/pull/36146

GitOrigin-RevId: db9e112e92ec7de1c3f8e7ebb8e6171391853dd6
Change-Id: Idfdc28c99037bcad808dd70084057b0adf7adc6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95983
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-03-10 20:02:52 +00:00
Lasse R.H. Nielsen 2e9ff26527 Fix overflow bug in BigInt implementations.
Fixes #36105

Bug: http://dartbug.com/36105
Change-Id: I9adf70d11474f844d2a4fbf5fcc3754562b1cf65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95644
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2019-03-08 16:11:08 +00:00
wtoalabi 6231ba0b18 Added appropriate comma within comment.
Closes #35685
https://github.com/dart-lang/sdk/pull/35685

GitOrigin-RevId: 25e6bca8cb266e0922062ca55228eec06467b110
Change-Id: I17318554d6114e3ec030884afb3edd0a7d899252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/89980
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2019-03-08 10:23:07 +00:00
Ben Konyi 585eb7f507 [ VM / Service ] Added disableBreakpoints parameter to evaluate, evaluateInFrame and invoke RPCs
- Setting the `disableBreakpoints` parameter to true will result in any
breakpoints hit during execution resulting from an evaluate or invoke
call to be ignored.
- Default behavior is the same (break on breakpoints).
- Updated Observatory eval box to disable breakpoints.
- Added tests

Change-Id: Ibf40f8a8de018718435118e13cc2e969f8ed7944
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95320
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-03-08 02:19:06 +00:00
Kevin Moore 1551d9c660 Include correct stack during error with Stream.join
Fixes https://github.com/dart-lang/sdk/issues/36135

Change-Id: I0f5397acde81ed74a28b7dd25bc81d34ac21a130
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95740
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-03-07 14:52:26 +00:00
Johnni Winther 6227ab0b97 Replace @ForceInline with @pragma in dart:html
Change-Id: I73afc500438d3fba92f549c8c1955f5ccad47751
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95033
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-05 12:17:18 +00:00
Johnni Winther 013cf68624 Replace js_helper annotations with @pragma
@ForceInline is still used by dart:html, will be removed in a later CL.

Change-Id: I480325fe91cc6baefb17ead49f839442e023d441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95160
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-05 08:56:18 +00:00
Régis Crelier c2a48ee065 [VM] Fix bigint left shift that could cause heap corruption when intrinsified.
The size of the result digit array was not computed correctly.
When 64-bit intrinsics are used, one extra digit pair must be allocated.

Change-Id: Id3ca3a16ef24b598e44bf25221d400b9be71248a
Reviewed-on: https://dart-review.googlesource.com/c/94683
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-03-01 18:59:10 +00:00
Lasse R.H. Nielsen 7c70ab1817 Revert change that empirically doesn't improve code for dart2js stopwatch.
Change-Id: Ib7a29c51c9d503c251fb28be4edc0becdc0a68c2
Reviewed-on: https://dart-review.googlesource.com/c/94745
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2019-02-28 14:12:26 +00:00
Lasse R.H. Nielsen 40bab34fbd Fix Stopwatch timers to not overflow on intermediate computations.
With a nanosecond tick counter, the elapsedMicroseconds getter
could overflow if a stopwatch runs for only ~2.5 hours.

Change-Id: I10cb54bba928713a3127a6bfbd19346b01d775b0
Reviewed-on: https://dart-review.googlesource.com/c/94381
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-02-27 09:56:12 +00:00