Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: lib/src/compiler/compiler.dart

Issue 2288453002: Make source map paths relative (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Fix paths in map Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | test/codegen_expected/map_keys.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/compiler.dart
diff --git a/lib/src/compiler/compiler.dart b/lib/src/compiler/compiler.dart
index d9b6b9630283595e72a25147f74b18daa4671e59..e8b5a1697b3d16b7e2086ec0983e701b40156952 100644
--- a/lib/src/compiler/compiler.dart
+++ b/lib/src/compiler/compiler.dart
@@ -363,12 +363,14 @@ class JSModuleFile {
new JS.Printer(opts, printer, localNamer: new JS.TemporaryNamer(tree)));
if (options.sourceMap && options.sourceMapComment) {
- printer.emit('\n//# sourceMappingURL=$mapUrl\n');
+ // Assume these are in the same directory and use relative paths.
Jennifer Messerly 2016/08/26 23:06:37 I don't understand why we need this assumption. Ca
vsm 2016/08/26 23:19:48 Done.
+ assert(path.dirname(jsUrl) == path.dirname(mapUrl));
+ printer.emit('\n//# sourceMappingURL=${path.basename(mapUrl)}\n');
}
Map builtMap;
if (sourceMap != null) {
- builtMap = placeSourceMap(sourceMap.build(jsUrl), mapUrl);
+ builtMap = placeSourceMap(sourceMap.build(path.basename(jsUrl)), mapUrl);
Jennifer Messerly 2016/08/26 23:06:37 here too, I don't see why this is needed, the whol
vsm 2016/08/26 23:19:48 done - see below.
}
return new JSModuleCode(printer.getText(), builtMap);
}
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | test/codegen_expected/map_keys.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698