| Index: pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
|
| diff --git a/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart b/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
|
| index 322138959091a10f851418cc8608cc8059b10d37..b3cd932004444890e3329a7297c62e6483611274 100644
|
| --- a/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
|
| +++ b/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
|
| @@ -66,7 +66,9 @@ class SourceMapPrintingContext extends JS.SimpleJavaScriptPrintingContext {
|
|
|
| void exitNode(JS.Node jsNode) {
|
| AstNode node = jsNode.sourceInformation;
|
| - if (unit == null || node == null || node.offset == -1) return;
|
| + if (unit == null || node == null || node.offset == -1 || node.isSynthetic) {
|
| + return;
|
| + }
|
|
|
| // TODO(jmesserly): in many cases marking the end will be unnecessary.
|
| // Skip MethodDeclarations - in the case of a one line function it finds the
|
| @@ -95,9 +97,13 @@ class SourceMapPrintingContext extends JS.SimpleJavaScriptPrintingContext {
|
| if (next.lineNumber == loc.lineNumber + 1) {
|
| loc = next;
|
| }
|
| + var sourceUrl =
|
| + sourcePath.startsWith('dart:') || sourcePath.startsWith('package:')
|
| + ? sourcePath
|
| + : new Uri.file(sourcePath);
|
| sourceMap.addLocation(
|
| new SourceLocation(offset,
|
| - sourceUrl: sourcePath,
|
| + sourceUrl: sourceUrl,
|
| line: loc.lineNumber - 1,
|
| column: loc.columnNumber - 1),
|
| new SourceLocation(buffer.length, line: _line, column: _column),
|
|
|