Chromium Code Reviews| Index: lib/parser.dart |
| diff --git a/lib/parser.dart b/lib/parser.dart |
| index c651f89ff11748fbe954655495274cc0885c767e..3ae25967d462fffa1943bd8a97a3d64684d3a7ab 100644 |
| --- a/lib/parser.dart |
| +++ b/lib/parser.dart |
| @@ -213,7 +213,14 @@ class MappingBundle extends Mapping { |
| if (_mappings.containsKey(name)) { |
| return _mappings[name].spanFor(line, column, files: files, uri: name); |
| } |
| - return null; |
| + // The uri doesn't have a source map so create a SourceMapSpan matching |
| + // the input location as well as possible. Fake the file offset because |
|
Siggi Cherem (dart-lang)
2016/12/09 16:38:38
nits:
- input and output is a bit confusing here.
Jacob
2016/12/09 17:18:03
Done.
|
| + // we don't really know it. This fake offset avoids locations with the |
| + // same offset but different lines and columns. |
| + var offset = line * 1000000000 + column; |
|
Siggi Cherem (dart-lang)
2016/12/09 16:38:38
wow, 1 billion! that's a very long line :)
Can we
Jacob
2016/12/09 17:18:03
Switched to a million. Note that SourceMapSpan doe
|
| + var location = new SourceLocation(offset, |
| + line: line, column: column, sourceUrl: Uri.parse(uri)); |
| + return new SourceMapSpan(location, location, ""); |
| } |
| } |