dart-sdk/sdk
Nicholas Shahan 2379cdc080 [ddc] Enforce more null safety on js interop
- Add a runtime flag to enable checks on non-nullable APIs that
  return values from non-static JavaScript interop.
- Call a new helper method at the call site when these APIs are
  detected to perform the null check.
- Add test file for the cases we can detect and enforce.

NOTE: This does not make non-static JavaScript interop sound.
This only adds more checks to enforce soundness with respect
to nullability in some cases. There are still holes that will
never be closed due to the permissive nature of this form of
JavaScript interop.

Change-Id: I2f88d1543a683fdc84d764e2b0eaafeb0ca73107
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358581
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-04-03 23:20:15 +00:00
..
bin [dart2wasm] Remove sdk/bin/dart2wasm{,_developer} scripts 2024-01-19 16:05:27 +00:00
lib [ddc] Enforce more null safety on js interop 2024-04-03 23:20:15 +00:00
.gitignore
api_readme.md [docs/api] Minor adjustments and fixes to api.dart.dev homepage 2024-02-01 21:41:38 +00:00
BUILD.gn [SDK] - Ensure we only build an AOT snapshot for the frontend-server 2024-04-03 18:27:39 +00:00
OWNERS