Index: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart |
index 66cf22a69de2bb74e33ef1b021dba5cd603277b5..f3255a1a50fcbf9600a5d06dfeb610ab3cf9be67 100644 |
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart |
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart |
@@ -1547,7 +1547,10 @@ if (typeof $printHelperName === "function") { |
void outputSourceMap(String code, String name) { |
if (!generateSourceMap) return; |
- SourceFile compiledFile = new SourceFile(null, compiler.assembledCode); |
+ // Create a source file for the compilation output. This allows using |
+ // [:getLine:] to transform offsets to line numbers in [SourceMapBuilder]. |
+ SourceFile compiledFile = new StringSourceFile(null, |
+ compiler.assembledCode); |
ahe
2013/10/16 14:26:04
Try to keep things together by wrapping this line
lukas
2013/10/17 07:21:25
Done.
|
String sourceMap = buildSourceMap(mainBuffer, compiledFile); |
compiler.outputProvider(name, 'js.map') |
..add(sourceMap) |