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

Unified Diff: pkg/compiler/lib/src/apiimpl.dart

Issue 1247773002: Add access the Message in CompilerDiagnostics.report. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 5 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 | « pkg/compiler/lib/compiler_new.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/apiimpl.dart
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index cac25b1cd3dd3d6d048040785647280c1aeeba17..808f88f1fc0fbdd25987d6cbcf6e270b6663027f 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -196,7 +196,8 @@ class Compiler extends leg.Compiler {
}
void log(message) {
- callUserHandler(null, null, null, message, api.Diagnostic.VERBOSE_INFO);
+ callUserHandler(
+ null, null, null, null, message, api.Diagnostic.VERBOSE_INFO);
}
/// See [leg.Compiler.translateResolvedUri].
@@ -427,9 +428,10 @@ class Compiler extends leg.Compiler {
// [:span.uri:] might be [:null:] in case of a [Script] with no [uri]. For
// instance in the [Types] constructor in typechecker.dart.
if (span == null || span.uri == null) {
- callUserHandler(null, null, null, '$message', kind);
+ callUserHandler(message, null, null, null, '$message', kind);
} else {
- callUserHandler(span.uri, span.begin, span.end, '$message', kind);
+ callUserHandler(
+ message, span.uri, span.begin, span.end, '$message', kind);
}
}
@@ -438,11 +440,11 @@ class Compiler extends leg.Compiler {
&& (options.indexOf('--allow-mock-compilation') != -1);
}
- void callUserHandler(Uri uri, int begin, int end,
- String message, api.Diagnostic kind) {
+ void callUserHandler(leg.Message message, Uri uri, int begin, int end,
+ String text, api.Diagnostic kind) {
try {
userHandlerTask.measure(() {
- handler.report(uri, begin, end, message, kind);
+ handler.report(message, uri, begin, end, text, kind);
});
} catch (ex, s) {
diagnoseCrashInUserCode(
« no previous file with comments | « pkg/compiler/lib/compiler_new.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698