Allow updating the `targetUrl` property of SingleMapping. R=sigmund@google.com Review URL: https://codereview.chromium.org//397693002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/source_maps@38245 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkgs/source_maps/lib/parser.dart b/pkgs/source_maps/lib/parser.dart index f53f7ed..3fd0d14 100644 --- a/pkgs/source_maps/lib/parser.dart +++ b/pkgs/source_maps/lib/parser.dart
@@ -136,9 +136,6 @@ /// A map containing direct source mappings. class SingleMapping extends Mapping { - /// Url of the target file. - final String targetUrl; - /// Source urls used in the mapping, indexed by id. final List<String> urls; @@ -148,10 +145,13 @@ /// Entries indicating the beginning of each span. final List<TargetLineEntry> lines; - /// Source root appended to the start of all entries in [urls]. - String sourceRoot = null; + /// Url of the target file. + String targetUrl; - SingleMapping._internal(this.targetUrl, this.urls, this.names, this.lines); + /// Source root appended to the start of all entries in [urls]. + String sourceRoot; + + SingleMapping._(this.targetUrl, this.urls, this.names, this.lines); factory SingleMapping.fromEntries( Iterable<builder.Entry> entries, [String fileUrl]) { @@ -191,7 +191,7 @@ srcNameId)); } } - return new SingleMapping._internal( + return new SingleMapping._( fileUrl, urls.keys.toList(), names.keys.toList(), lines); }