dart-sdk/sdk/lib/core
Lasse R.H. Nielsen f0aeebd0e7 Make all platforms return null from Error.stackTrace until thrown.
The web platforms used to invent a spurious stack trace when reading
`Error.stackTrace` before the object was thrown.
They now return `null` instead, if there is no underlying JS error object,
matching specified behavior.

Fixed bugs in async error throwing in dart2wasm:
* `throw` in an async function did not set the stack trace on an error.
  Now calls `Error._throw` instead of just a direct Wasm "throw".
* `async*` functions did not capture the stack trace of a throw
  that ended the function body, which means it called
  `StreamController.addError` with only one argument.
  That then resused the stack trace from an `Error` throw instead
  of the correct stack trace.

Added tests.

Change-Id: I1d9fa8d9e18076a7fe28254b60b950866cd550a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354021
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-02-27 23:01:06 +00:00
..
annotations.dart fix @override description typo 2023-08-07 17:00:48 +00:00
bigint.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
bool.dart Fix bad link in updated docs. 2023-10-20 14:47:26 +00:00
comparable.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
core.dart Add nonNulls, indexed and other extensions on iterables. 2023-04-04 23:05:54 +00:00
core_sources.gni
date_time.dart Fix docs of DateTime.from constructors 2023-07-11 10:03:48 +00:00
double.dart [flip-modifiers]: Reapply "Enforce current library restrictions." 2023-03-03 09:37:38 +00:00
duration.dart Use padLeft in Duration.toString. 2023-04-05 06:24:20 +00:00
enum.dart Add extra documentation to Enum to point to EnumName. 2024-01-23 09:34:32 +00:00
errors.dart Make all platforms return null from Error.stackTrace until thrown. 2024-02-27 23:01:06 +00:00
exceptions.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
function.dart [docs] Fix small typo in code example for Function 2023-04-27 17:07:38 +00:00
identical.dart Update documentation on Record and identical. 2023-04-13 12:35:44 +00:00
int.dart Update documentation on fromEnvironment constructors. 2023-10-20 07:57:18 +00:00
invocation.dart
iterable.dart Document the return value of any and every for empty values. 2023-07-11 13:05:40 +00:00
iterator.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
list.dart Hide the existence of EfficientLengthIterable better. 2023-09-12 11:08:42 +00:00
map.dart Add a few more class modifiers. 2023-04-07 21:54:44 +00:00
null.dart [flip-modifiers]: Reapply "Enforce current library restrictions." 2023-03-03 09:37:38 +00:00
num.dart [flip-modifiers]: Reapply "Enforce current library restrictions." 2023-03-03 09:37:38 +00:00
object.dart [dart2wasm] Improve closure hash codes 2024-02-21 14:44:20 +00:00
pattern.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
print.dart Adds tests and documentation for print line ending behavior 2023-10-17 22:10:38 +00:00
record.dart Update documentation on Record and identical. 2023-04-13 12:35:44 +00:00
regexp.dart Make RegExpMatch.pattern have type RegExp. 2023-04-04 20:34:36 +00:00
set.dart Hide the existence of EfficientLengthIterable better. 2023-09-12 11:08:42 +00:00
sink.dart Add a few more class modifiers. 2023-04-07 21:54:44 +00:00
stacktrace.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
stopwatch.dart
string.dart String.fromCharCodes allows start and end after end of iterable. 2023-11-17 13:34:22 +00:00
string_buffer.dart Add tests to ensure that \n is not translated to the platform line ending and document that behavior. 2023-05-24 18:50:29 +00:00
string_sink.dart Add tests to ensure that \n is not translated to the platform line ending and document that behavior. 2023-05-24 18:50:29 +00:00
symbol.dart
type.dart Add a few more class modifiers. 2023-04-07 21:54:44 +00:00
uri.dart Refer to unnamed constructors in doc comments with '.new' 2023-10-17 14:42:38 +00:00
weak.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00