commit | aa34e70d503048d9a9ce6d2b7066a1a38e53c49c | [log] [tgz] |
---|---|---|
author | Alexander Markov <alexmarkov@google.com> | Thu Jan 30 09:48:40 2025 -0800 |
committer | Alexander Markov <alexmarkov@google.com> | Thu Jan 30 09:48:40 2025 -0800 |
tree | 78bc8485429fffc93794d13cd4b9d0c2a7d84377 | |
parent | 126af93f388a33c6f06167ad5667f6f5a509e4ab [diff] |
Revert "Make Zone functions not call `register*`, but properly catch errors." This reverts commit fc2c46ae82cf9c34a7c20bfaecaa759782ba1533. Reason for revert: broke Flutter tests: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8724303399273084113/+/u/Run_framework_coverage_tests/stdout https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8724303399273084097/+/u/Run_framework_tests_libraries_tests/stdout https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8724303399273084081/+/u/Run_framework_tests_misc_tests/stdout https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8724303399273084049/+/u/Run_framework_tests_widgets_tests/stdout https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8724303399273084033/+/u/Run_tool_tests_tests/stdout Original change's description: > Make Zone functions not call `register*`, but properly catch errors. > > Make `Zone.createTimer`, `Zone.createPeriodicTimer` and `Zone.scheduleMicrotask` > not call register on the same zone. > These are low-level functions that should not build on top > of other low-level functions. > > Instead the function is registered in the `Timer` constructors and > top-level `scheduleMicrotask` code, and the root zone's `createTimer` > and `scheduleMicrotask` just make sure that the callback will run > in its original zone, and that uncaught errors are handled in the > correct zone. > Avoids a double-registration that timers did. > > Significant clean-up. > - The private `_Zone`, `_ZoneSpecification` and `_ZoneDelegate` > subclasses are not necessary now that their superclasses are `final`. > - Stopped using type aliases instead of function types > and old-style function arguments. > - Renamed some parameters to not be, fx, `f`. > > Avoided some closure allocations for microtasks by putting the zone > into the queue entry, instead of wrapping the callback in a closure calling `zone.run`. > > This is a potentially visible change if any code uses the zone functions > directly and expect them to invoke `Zone.register*`. > (Suspiciously no test failed with this change. May need to add some.) > > Fixes #59913. > > CoreLibraryReviewExempt: Have had all +1s, just not at the same time. > Bug: https://dartbug.com/59913 > Change-Id: Ie3c87f5f22aedcbe30ab04718df98e1c0f0659c3 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405020 > Reviewed-by: Martin Kustermann <kustermann@google.com> > Commit-Queue: Lasse Nielsen <lrn@google.com> Bug: https://dartbug.com/59913 Change-Id: I386b2b6d2594a50a7597363e13fe24111ea72ade Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406685 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Jake Macdonald <jakemac@google.com>
Dart is:
Approachable: Develop with a strongly typed programming language that is consistent, concise, and offers modern language features like null safety and patterns.
Portable: Compile to ARM, x64, or RISC-V machine code for mobile, desktop, and backend. Compile to JavaScript or WebAssembly for the web.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app. Diagnose app issues using DevTools.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents in our repo at docs.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
Future plans for Dart are included in the combined Dart and Flutter roadmap on the Flutter wiki.