| 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 597d50ef8f735601d7a352b37519ae858506fd98..7f4bf146e9ec531ac1b3fde9c736e2e349956c40 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
|
| @@ -1548,7 +1548,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);
|
| String sourceMap = buildSourceMap(mainBuffer, compiledFile);
|
| compiler.outputProvider(name, 'js.map')
|
| ..add(sourceMap)
|
|
|