dart-sdk/tools
Lasse R.H. Nielsen 4d750a862d Make nullFuture be per-zone.
We introduced a `nullFuture` during the null-safety migration where
we changed some methods to no longer allow returning `null`,
and they therefore had to return a `Future`.
That affected timing, because returning `null` was processed
synchronously, and that change in timing made some tests fail.
Rather that fix the fragile tests, we made the function return
a recognizable future, a canonical `Future<Null>.value(null)`,
and then recognized it and took a synchronous path for it.

That caused other issues, because the future was created in the
root zone. (Well, originally, it was created in the first zone
which needed one, that was worse. Now it's created in the root zone.)
Some code tries to contain asynchrony inside a custom zone, and
then the get a `nullFuture` and calls `then` on it, and that
schedules a microtask in the root zone.
(It should probably have used the listener's zone, and not store
a zone in the future at all, but that's how it was first done,
and now people rely on that behavior too.)

This change creates a `null` future *per zone* (lazily initialized
when asked for). That should be sufficient because the code recognizing
a returned `null` future is generally running in the same zone,
but if any other code gets the `nullFuture`, it will be in the
expected zone for where it was requested.

This is a reland of commit a247b158d6

Change-Id: Ia113756de1f6d50af4b1abfec219d6b4dcd5d59b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249488
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-06-23 09:19:45 +00:00
..
bots [ddc] Add new test and builder configurations 2022-06-14 17:54:47 +00:00
buildtools [tools] Allow update.py to run on mac arm machines 2022-05-03 20:29:17 +00:00
dart2js Stop using deprecated "screaming caps" constants from dart:io 2022-03-09 16:08:44 +00:00
dom Make nullFuture be per-zone. 2022-06-23 09:19:45 +00:00
fuchsia [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
linux_dist_support [infra] Remove references to unsupported ARMv6 and ARMv5TE. 2022-03-17 00:07:54 +00:00
package_deps move the third_party/pkg_tested packages into third_party/pkg 2022-06-13 17:04:36 +00:00
patches [3xH] Use gclient wrapper script to invoke gclient correctly 2022-03-01 09:39:45 +00:00
sdks [infra] Upload RISCV64 SDK. 2022-03-30 22:18:50 +00:00
spec_parser [repo] improve the analysis of the tools/ directory 2022-02-17 19:09:52 +00:00
test_generators Change "dartfmt" -> "dart format" in test generator. 2021-10-04 17:11:27 +00:00
testing
verify_docs [pkg] prefer 'any' deps for package dev dependencies 2022-05-27 01:34:59 +00:00
.gitignore
3xhead_flutter_hooks.sh
addlatexhash.dart [deps] rev package:file 2022-05-10 00:08:42 +00:00
analysis_options.yaml [repo] improve the analysis of the tools/ directory 2022-02-17 19:09:52 +00:00
build.py [build] Check that a second Ninja invocation does nothing. 2021-05-26 17:48:30 +00:00
canary.dart
copy_dart.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
copy_tree.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
create_pkg_manifest.py [tools] Update all iteritems -> items 2021-05-20 11:36:52 +00:00
diff_results.dart Migrate several files in tools/. 2022-06-10 16:31:04 +00:00
download_chromium_sysroot.sh [infra] Remove wheezy left overs from SDK 2020-06-04 18:32:29 +00:00
experimental_features.yaml Turn on the experimental feature inference-update-1. 2022-05-24 13:54:23 +00:00
FAKE_COMMITS [infra] Trigger mac builds now that the snoopy service is installed. 2022-05-25 11:14:55 +00:00
find_depot_tools.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
gen_fuchsia_test_manifest.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
generate_buildfiles.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
generate_experimental_flags.dart [repo] improve the analysis of the tools/ directory 2022-02-17 19:09:52 +00:00
generate_idefiles.py [tool] idefiles remove analysis_options.yaml generation 2021-07-15 10:53:29 +00:00
generate_package_config.dart move the third_party/pkg_tested packages into third_party/pkg 2022-06-13 17:04:36 +00:00
generate_package_config.py [infra] re-land work to auto-generate .dart_tool/package_config.json 2022-04-12 17:21:02 +00:00
generate_sdk_version_file.py [sdk] Generate a version file for the unpatched SDK 2022-05-05 10:36:05 +00:00
get_dot_git_folder.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
git_cl_try.sh [vm] Update bot list in tools/git_cl_try.sh 2022-04-22 15:35:20 +00:00
gn.py Reland "[build] Fix Android build for ARM64 Mac." 2022-05-10 16:11:53 +00:00
gn_helpers.py
line_doc_comments.dart Fix typos 2022-06-15 11:08:28 +00:00
list_dart_files.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
list_dart_files_as_depfile.py Reapply "[build] Track glob dependencies via depfiles, instead of always re-executing scripts at GN time." 2021-05-12 00:27:28 +00:00
make_version.py [vm] Rename clustered_snapshot.h/cc to app_snapshot.h/cc. 2021-09-16 00:13:34 +00:00
manage_deps.dart Allow depot_tools to update in tools/manage_deps.dart 2022-03-30 12:00:50 +00:00
minidump.py [tool] Fixes crash in tools/minidump.py 2021-05-17 10:30:30 +00:00
opt_out_files.dart [repo] improve the analysis of the tools/ directory 2022-02-17 19:09:52 +00:00
OWNERS [owners] ecosystem can review tools/ changes 2022-05-09 17:38:29 +00:00
OWNERS_ANALYZER [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
OWNERS_BUILD [infra] Give VM engineers OWNERS over tools/gn.py et al. 2022-04-25 17:47:23 +00:00
OWNERS_CFE [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
OWNERS_ECOSYSTEM add an owners file for the ecosystem team 2022-04-13 15:35:22 +00:00
OWNERS_ENG add a tools/OWNERS_GOOGLE3 owners file 2022-04-19 21:31:07 +00:00
OWNERS_FOUNDATION [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
OWNERS_GOOGLE3 add a tools/OWNERS_GOOGLE3 owners file 2022-04-19 21:31:07 +00:00
OWNERS_INFRA [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
OWNERS_PRODUCT [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
OWNERS_PUB Add OWNERS_PUB 2022-03-07 13:33:42 +00:00
OWNERS_VM [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
OWNERS_WASM OWNERS files for dart2wasm 2022-02-17 09:26:23 +00:00
OWNERS_WEB [owners] Add Nate to OWNERS_WEB 2022-06-09 16:47:43 +00:00
presubmit.sh
promote.py [infra] Rely on the default ACL when uploading release artifacts. 2021-11-26 11:34:04 +00:00
publish_pkg.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
rev_sdk_deps.dart [tools] use comments in the DEPS file to prevent auto-reving of deps 2022-06-19 19:11:11 +00:00
run_offsets_extractor.sh [vm] Support RISC-V. 2022-01-20 00:57:57 +00:00
run_with_coredumps_enabled.py [gardening] Add coredump archiving support to iso-stress builder. 2021-10-04 08:49:28 +00:00
set_ia32_sysroot.sh
set_x64_sysroot.sh
spec_parse.py Migrate tools/spec_parse.py to use python3 2021-04-19 15:33:38 +00:00
task_kill.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
test.dart [infra] Update checked-in SDKs to 2.12.0-0.0.dev 2020-11-05 07:53:22 +00:00
test.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
utils.py [build] Fix false detection of compressed pointers as cross builds. 2022-05-16 20:22:25 +00:00
validate_test_matrix.dart Migrate several files in tools/. 2022-06-10 16:31:04 +00:00
VERSION [release] Bump version to 2.18 2022-04-08 08:25:33 +00:00
write_dartdoc_options_file.py Update dartdoc to 1.0.0 and lock down dartdoc warnings. 2021-06-29 19:31:28 +00:00
write_revision_file.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
write_version_file.py [infra] Migrate scripts to python3 2021-04-15 10:10:20 +00:00
yaml2json.dart [repo] improve the analysis of the tools/ directory 2022-02-17 19:09:52 +00:00