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

Unified Diff: pkg/front_end/lib/src/base/processed_options.dart

Issue 3010033002: don't use internal throwOnWarnings option (Closed)
Patch Set: review updates Created 3 years, 3 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 | « no previous file | pkg/front_end/tool/bazel/worker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/base/processed_options.dart
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index 209af26433bc071c6d35b601c6aa024c2536c004..0173a3572764c32df35bc5838a535661241de709 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -613,9 +613,14 @@ class _CompilationMessage implements CompilationMessage {
String get dart2jsCode => _original.code.dart2jsCode;
- SourceSpan get span =>
- new SourceLocation(_original.charOffset, sourceUrl: _original.uri)
- .pointSpan();
+ SourceSpan get span {
+ if (_original.charOffset == -1) {
+ if (_original.uri == null) return null;
+ return new SourceLocation(0, sourceUrl: _original.uri).pointSpan();
+ }
+ return new SourceLocation(_original.charOffset, sourceUrl: _original.uri)
+ .pointSpan();
+ }
_CompilationMessage(this._original, this.severity);
« no previous file with comments | « no previous file | pkg/front_end/tool/bazel/worker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698