Make devmode.js have a module specific filename

Review by: jgw@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9859 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
index 68235ea..58f7d26 100644
--- a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
@@ -121,7 +121,7 @@
     }
     replaceAll(ss, "__MODULE_FUNC__", context.getModuleFunctionName());
     replaceAll(ss, "__MODULE_NAME__", context.getModuleName());
-    replaceAll(ss, "__HOSTED_FILENAME__", getHostedFilename());
+    replaceAll(ss, "__HOSTED_FILENAME__", getHostedFilenameFull(context));
 
     return ss.toString();
   }
@@ -136,6 +136,10 @@
     return "devmode.js";
   }
 
+  protected String getHostedFilenameFull(LinkerContext context) {
+    return context.getModuleName() + "." + getHostedFilename();
+  }
+
   protected String getJsComputeScriptBase(LinkerContext context) {
     return "com/google/gwt/core/ext/linker/impl/computeScriptBase.js";
   }
@@ -266,7 +270,15 @@
 
     String outputFilename = filename;
     if (result != null) {
+      // If we're including bootstrap in the primary fragment, we generate a
+      // devmode.js for each permutation, and it's name is XXX.devmode.js,
+      // where XXX is the md5 hash for this permutation
       outputFilename = result.getStrongName() + "." + outputFilename;
+    } else {
+      // If we're not including bootstrap in the primary fragment, we generate
+      // a devmode.js for this module and it's name is XXX.devmode.js, where
+      // XXX is the module name.
+      outputFilename = getHostedFilenameFull(context);
     }
 
     String script =