mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 20:39:38 +00:00
Fix names of map files in the startup emitter.
R=sigmund@google.com Review URL: https://codereview.chromium.org//1295873002 .
This commit is contained in:
parent
f0b81a44bb
commit
f9d05b6e29
|
@ -86,6 +86,7 @@ class ModelEmitter {
|
|||
static const String deferredInitializersGlobal =
|
||||
r"$__dart_deferred_initializers__";
|
||||
|
||||
static const String partExtension = "part";
|
||||
static const String deferredExtension = "part.js";
|
||||
|
||||
static const String typeNameProperty = r"builtin$cls";
|
||||
|
@ -279,7 +280,7 @@ class ModelEmitter {
|
|||
|
||||
if (shouldGenerateSourceMap) {
|
||||
outputSourceMap(mainOutput, lineColumnCollector, '',
|
||||
compiler.sourceMapUri, compiler.outputUri);
|
||||
compiler.sourceMapUri, compiler.outputUri);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,17 +337,17 @@ class ModelEmitter {
|
|||
Uri mapUri, partUri;
|
||||
Uri sourceMapUri = compiler.sourceMapUri;
|
||||
Uri outputUri = compiler.outputUri;
|
||||
String partName = "$hunkPrefix.$partExtension";
|
||||
String hunkFileName = "$hunkPrefix.$deferredExtension";
|
||||
|
||||
if (sourceMapUri != null) {
|
||||
String mapFileName =
|
||||
hunkPrefix + deferredExtension + ".map";
|
||||
String mapFileName = hunkFileName + ".map";
|
||||
List<String> mapSegments = sourceMapUri.pathSegments.toList();
|
||||
mapSegments[mapSegments.length - 1] = mapFileName;
|
||||
mapUri = compiler.sourceMapUri.replace(pathSegments: mapSegments);
|
||||
}
|
||||
|
||||
if (outputUri != null) {
|
||||
String hunkFileName = hunkPrefix + deferredExtension;
|
||||
List<String> partSegments = outputUri.pathSegments.toList();
|
||||
partSegments[partSegments.length - 1] = hunkFileName;
|
||||
partUri = compiler.outputUri.replace(pathSegments: partSegments);
|
||||
|
@ -354,7 +355,7 @@ class ModelEmitter {
|
|||
|
||||
output.add(generateSourceMapTag(mapUri, partUri));
|
||||
output.close();
|
||||
outputSourceMap(output, lineColumnCollector, hunkPrefix, mapUri, partUri);
|
||||
outputSourceMap(output, lineColumnCollector, partName, mapUri, partUri);
|
||||
} else {
|
||||
output.close();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue