Index: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart |
index e95f7721b77c79e1323b20d78231b05499e50f66..8ce9e34adb54191d28c94b83b1193b68616a1dd9 100644 |
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart |
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart |
@@ -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(); |
} |