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

Unified Diff: lib/src/codegen/html_codegen.dart

Issue 1235293004: Fix server mode (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | lib/src/server/server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/html_codegen.dart
diff --git a/lib/src/codegen/html_codegen.dart b/lib/src/codegen/html_codegen.dart
index 08ea0dc796c0b11a64d8349bea695069da905a41..6e0f0ece7a104bbb212ba4ad9b0f5b16e4da7cdc 100644
--- a/lib/src/codegen/html_codegen.dart
+++ b/lib/src/codegen/html_codegen.dart
@@ -80,12 +80,15 @@ String generateEntryHtml(HtmlSourceNode root, AbstractCompiler compiler) {
}
String mainLibraryName;
+ var src = scripts[0].attributes["src"];
+ var scriptUri = root.source.resolveRelativeUri(Uri.parse(src));
+
for (var lib in libraries) {
var info = lib.info;
if (info == null) continue;
var uri = info.library.source.uri;
var jsPath = compiler.getModulePath(uri);
- if (info.isEntry) mainLibraryName = compiler.getModuleName(uri);
+ if (uri == scriptUri) mainLibraryName = compiler.getModuleName(uri);
if (lib.cachingHash != null) {
jsPath = _addHash(jsPath, lib.cachingHash);
}
« no previous file with comments | « no previous file | lib/src/server/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698