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

Unified Diff: sdk/lib/_internal/pub/bin/async_compile.dart

Issue 549623003: Make compiler imports relative in async-compiled code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
Index: sdk/lib/_internal/pub/bin/async_compile.dart
diff --git a/sdk/lib/_internal/pub/bin/async_compile.dart b/sdk/lib/_internal/pub/bin/async_compile.dart
index 332465be6e8c070843241a6214ca552aff754aec..c40d54d95ceb1b8c9302f5920c93c20d358b4892 100644
--- a/sdk/lib/_internal/pub/bin/async_compile.dart
+++ b/sdk/lib/_internal/pub/bin/async_compile.dart
@@ -175,7 +175,8 @@ String _translateAsyncAwait(String sourcePath, String source) {
/// to fix those to be valid relative imports from the build directory.
String _fixDart2jsImports(String sourcePath, String source, String destPath) {
var compilerDir = p.url.join(sourceUrl, "../compiler");
- var relative = p.url.relative(compilerDir, from: p.dirname(destPath));
+ var relative = p.url.relative(compilerDir,
+ from: p.dirname(p.toUri(destPath).toString()));
nweiz 2014/09/09 19:21:31 This should be p.url.dirname if it's working on a
return source.replaceAll(_compilerPattern, "import '$relative");
}

Powered by Google App Engine
This is Rietveld 408576698