dart-sdk/runtime
Alexander Markov 274b4d3ecb [vm/nnbd] Avoid passing null as a non-nullable argument of _AssertionError._create
In kernel files assertion conditions are specified as a range of source
positions. Sometimes source texts are not available and VM cannot
extract assertion condition text, so Script::GetSnippet returns null.

With null safety it is no longer valid to pass null as a non-nullable
argument '_failedAssertion' of _AssertionError._create constructor,
so we should provide a valid String. This change converts 'null'
assertion condition text to "<optimized out>", similarly to AOT mode.

Issue https://github.com/flutter/flutter/issues/63513
Issue https://github.com/dart-lang/sdk/issues/34586

Change-Id: I9c5791e98fdef358068f3f5ddc4cfe98e8c7ed36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158162
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-08-12 00:23:20 +00:00
..
bin [vm] Fix memory leak in gen_kernel 2020-08-11 09:17:49 +00:00
docs [vm/ffi] Convert Objects to Dart_Handles in FFI calls 2020-06-12 11:14:22 +00:00
include [vm/ffi] dart_api_dl.c fix MacOS build 2020-08-10 16:57:23 +00:00
lib [vm/nnbd] Avoid passing null as a non-nullable argument of _AssertionError._create 2020-08-12 00:23:20 +00:00
llvm_codegen [BUILD] - Format gn files, this is being done to ensure the unfork CL 2020-03-10 21:56:11 +00:00
observatory [ Observatory ] Remove unused analytics codes 2020-08-04 02:38:43 +00:00
platform [vm] Make BufferFormatter also a subclass of BaseTextBuffer. 2020-08-07 21:40:45 +00:00
tests/vm [gardening] Mark regression test slow 2020-08-07 10:25:07 +00:00
third_party Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target" 2020-06-17 16:12:26 +00:00
tools [vm] Remove (unused & deprecated) --package-root parameter from VM binaries and from tests (Platform.packageRoot always returns null) 2020-06-24 18:17:53 +00:00
vm [vm/resolve] Cleanup ResolveDynamicAnyArgsWithCustomLookup. 2020-08-11 23:02:09 +00:00
.clang-tidy [vm] Add runtime/.clang-tidy file 2019-09-05 09:51:13 +00:00
.gitignore
BUILD.gn [vm] Build a runnable Fuchsia package containing Dart 2020-07-10 18:10:05 +00:00
codereview.settings
configs.gni Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target" 2020-06-17 16:12:26 +00:00
CPPLINT.cfg
PRESUBMIT.py [Presubmit] Fixes presubmit for breaking API change. 2020-03-03 13:30:20 +00:00
runtime_args.gni [vm] Fix linker bugs in --os=fuchsia release/product 2020-06-24 20:35:19 +00:00