Commit Graph

20 Commits

Author SHA1 Message Date
Lasse R.H. Nielsen 8760283247 New implementation of runZoned.
A combination of `runZoned` and `runZonedGuarded` where only the latter allows an `onError` parameter,
and only that has a nullable return type.

Retains the `onError` parameter on `runZoned` for now because it's too breaking to remove it until packages have been migrated off of it.
It will be removed in a follow-up CL.

Change-Id: If0e86c8d14e13fa089c66f4af975aeacb2616cf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137302
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-03-25 00:24:33 +00:00
Robert Nystrom a2b556b937 Migrate lib_2/async to NNBD.
Change-Id: Ia5c41dda6503e1fbb8cc6099835d07588425e2ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128310
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-01-09 22:04:37 +00:00
Ben Konyi d08e59e09c Migrated test block 171 to Dart 2.0.
R=rnystrom@google.com

Moved schedule_microtask[2,3,5]_test off of package:test to
package:async_helper and package:expect.
Review-Url: https://codereview.chromium.org/3001793002 .
2017-08-30 06:46:35 -07:00
Florian Loitsch 978213d427 Revert "Make Zone API strong mode clean."
This reverts commit 0b35711d48.

BUG=

Review-Url: https://codereview.chromium.org/2963743002 .
2017-06-28 13:31:32 +02:00
Florian Loitsch 0b35711d48 Make Zone API strong mode clean.
Review-Url: https://codereview.chromium.org/2959163002 .
2017-06-28 13:16:39 +02:00
Jacob Richman 14531fa62d Re-land "Format all multitests"
Only delta from the original is a bad merge of tests/corelib/list_test.dart

This reverts commit 44d8be0ed3.

BUG=

Review-Url: https://codereview.chromium.org/2774783002 .
2017-03-23 12:40:21 -07:00
Jacob Richman 44d8be0ed3 Revert "Format all multitests"
This reverts commit 312b66dd5f.

BUG=

Review-Url: https://codereview.chromium.org/2770063002 .
2017-03-23 10:49:40 -07:00
Jacob Richman 312b66dd5f Format all multitests
BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2768073002 .
2017-03-23 10:26:44 -07:00
Jacob Richman 88eb557b65 Fix warnings_checker.dart handling of multitests
Update all tests

Support //# multitests for better dartfmt compatibility and fewer multitest false positives

All files under tests were manually updated with

find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'

For now both old and new styles are allowed to accommodate CO19 tests.

R=efortuna@google.com
BUG=

Review-Url: https://codereview.chromium.org/2765693002 .
Review-Url: https://codereview.chromium.org/2765893003 .
2017-03-21 17:29:56 -07:00
Jacob Richman bf2b545150 Revert "Update all tests"
This reverts commit ce76e9c30beaf9a193d3677b88c20a1ebb3fae8c.
2017-03-21 16:33:18 -07:00
Jacob Richman 3c7353d987 Update all tests
Support //# multitests for better dartfmt compatibility and fewer multitest false positives

All files under tests were manually updated with

find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'

For now both old and new styles are allowed to accommodate CO19 tests.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2765693002 .
2017-03-21 12:39:28 -07:00
Jacob Richman 6a7d6c385e Add comments
Add spaces to make sure dartfmt doesn't destroy bespoke indentation

BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2763823002 .
2017-03-20 21:03:12 -07:00
lrn@google.com f9b8b18ab8 Rewrite Zone implementation to avoid recursively looking up stuff in the parent chain.
Reuses as much as possible of the parent zone's implementation representation.

Increases performance of primitive tests of only async operations by ~10% (but with a lot of variability and a spurious regression).

R=floitsch@google.com

Review URL: https://codereview.chromium.org//331993005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37807 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 07:26:01 +00:00
floitsch@google.com 0f7a0bd7b1 Rename runAsync to scheduleMicrotask.
R=lrn@google.com

Review URL: https://codereview.chromium.org//26151002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28569 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 15:52:17 +00:00
floitsch@google.com 35e2ed1e57 Expose Zones.
BUG= http://dartbug.com/11279
R=lrn@google.com

Review URL: https://codereview.chromium.org//23875032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27802 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 09:22:26 +00:00
floitsch@google.com 8e7d24a2c5 Fix run_zoned6 and run_zoned9 test.
Review URL: https://codereview.chromium.org//23450011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26787 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 13:43:45 +00:00
floitsch@google.com 003cfdc910 Fix run_zoned6|9_test.
BUG= http://dartbug.com/12817
R=kustermann@google.com

Review URL: https://codereview.chromium.org//23694002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26784 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 12:20:34 +00:00
floitsch@google.com 2ae198d527 Reapply "Zone support for Futures, Timer, Streams."
This reapplies commit r24034.
This reapplies commit r24035.
This reapplies commit r24036.
This reapplies commit r24037.

+ some status file updates and fixes.

Review URL: https://codereview.chromium.org//17098007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24064 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-15 11:28:38 +00:00
floitsch@google.com bcba9d5c8c Revert "Zone support for Futures."
Revert "Add Zone support for Timers."
Revert "Add zone support to streams."
Revert "catchErrors and waitForCompletion now based on runZonedExperimental."

This reverts commit r24034.
This reverts commit r24035.
This reverts commit r24036.
This reverts commit r24037.

Review URL: https://codereview.chromium.org//17064008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24042 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 17:17:16 +00:00
floitsch@google.com 9485a093ae catchErrors and waitForCompletion now based on runZonedExperimental.
R=lrn@google.com

Review URL: https://codereview.chromium.org//16801008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24037 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 16:29:32 +00:00