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

Unified Diff: sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 153553007: Add mirrors_reader_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small fix. Created 6 years, 10 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
Index: sdk/lib/_internal/compiler/implementation/compiler.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index d13da550c6b8a3809a3797be106b85ee7f9521e4..2551bf87be79a77f8ebbbffe9e80a602d417794a 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -499,10 +499,7 @@ abstract class Compiler implements DiagnosticListener {
return f();
} on SpannableAssertionFailure catch (ex) {
if (!hasCrashed) {
- String message = (ex.message != null) ? tryToString(ex.message)
- : tryToString(ex);
- SourceSpan span = spanFromSpannable(ex.node);
- reportError(ex.node, MessageKind.GENERIC, {'text': message});
+ reportAssertionFailure(ex);
pleaseReportCrash();
}
hasCrashed = true;
@@ -1397,6 +1394,13 @@ abstract class Compiler implements DiagnosticListener {
void reportDiagnostic(SourceSpan span, String message, api.Diagnostic kind);
+ void reportAssertionFailure(SpannableAssertionFailure ex) {
+ String message = (ex.message != null) ? tryToString(ex.message)
+ : tryToString(ex);
+ SourceSpan span = spanFromSpannable(ex.node);
+ reportError(ex.node, MessageKind.GENERIC, {'text': message});
+ }
+
SourceSpan spanFromTokens(Token begin, Token end, [Uri uri]) {
if (begin == null || end == null) {
// TODO(ahe): We can almost always do better. Often it is only
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart » ('j') | tests/lib/lib.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698