| Index: tool/input_sdk/lib/core/stacktrace.dart
|
| diff --git a/tool/input_sdk/lib/core/stacktrace.dart b/tool/input_sdk/lib/core/stacktrace.dart
|
| index a3b7a4f2e9395b9d0ef395296bb9c72bfd67fa28..17abd3831ed957102d61eaa16093b9e31e33a8a4 100644
|
| --- a/tool/input_sdk/lib/core/stacktrace.dart
|
| +++ b/tool/input_sdk/lib/core/stacktrace.dart
|
| @@ -14,6 +14,22 @@ part of dart.core;
|
| * them programmatically.
|
| */
|
| abstract class StackTrace {
|
| + StackTrace(); // In case existing classes extend StackTrace.
|
| +
|
| + /**
|
| + * Create a `StackTrace` object from [stackTraceString].
|
| + *
|
| + * The created stack trace will have a `toString` method returning
|
| + * `stackTraceString`.
|
| + *
|
| + * The `stackTraceString` can be a string returned by some other
|
| + * stack trace, or it can be any string at all.
|
| + * If the string doesn't look like a stack trace, code that interprets
|
| + * stack traces is likely to fail, so fake stack traces should be used
|
| + * with care.
|
| + */
|
| + factory StackTrace.fromString(String stackTraceString) = _StringStackTrace;
|
| +
|
| /**
|
| * Returns a representation of the current stack trace.
|
| *
|
| @@ -37,3 +53,8 @@ abstract class StackTrace {
|
| String toString();
|
| }
|
|
|
| +class _StringStackTrace implements StackTrace {
|
| + final String _stackTrace;
|
| + _StringStackTrace(this._stackTrace);
|
| + String toString() => _stackTrace;
|
| +}
|
|
|