Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: tool/input_sdk/lib/core/stacktrace.dart

Issue 1967383002: Upgrade StackTrace to the latest SDK version. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/browser/language_tests.js ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+}
« no previous file with comments | « test/browser/language_tests.js ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698