Oops, fix the $permProps patch for devmode and HtmlUnit
Change-Id: I59fba240f9c5dfbf85d021860f5496fb4f8510e1
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js b/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
index c6e4c59..50db804 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
@@ -7,6 +7,7 @@
var $errFn;
var $moduleName;
var $moduleBase;
+var $permProps; // unused but expected by module suffix
var __gwt_getProperty;
/******************************************************************************
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 60b08d5..3daa3fa 100644
--- a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
@@ -402,6 +402,8 @@
throws UnableToCompleteException {
TextOutput out = new DefaultTextOutput(context.isOutputCompact());
+ // Note: this code is included in both the primary fragment and devmode.js
+
// $wnd is the main window that the GWT code will affect and also the
// location where the bootstrap function was defined. In iframe-based linkers,
// $wnd is set to window.parent. Usually, in others, $wnd = window.
@@ -471,6 +473,7 @@
String strongName) {
// Note: this method won't be called if getModuleSuffix() is overridden and returns non-null.
+ // Note: this code is included in both the primary fragment and devmode.js.
DefaultTextOutput out = new DefaultTextOutput(context.isOutputCompact());
@@ -482,7 +485,7 @@
out.newlineOpt();
out.print("$sendStats('moduleStartup', 'end');");
out.newlineOpt();
- out.print("__gwtModuleFunction.__moduleStartupDone($permProps);");
+ out.print("$permProps && __gwtModuleFunction.__moduleStartupDone($permProps);");
writeMagicComments(out, context, 0, strongName);
return out.toString();