Bug 394473 - Mozilla Browser.evaluate broken for XULRunner 3.x due to changes to support XULRunner >= 4
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
index fd9f013..5fb1177 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
@@ -706,6 +706,9 @@
 			LocationProvider = new AppFileLocProvider (MozillaPath, profilePath, cacheParentPath, IsXULRunner);
 			LocationProvider.AddRef ();
 
+			/* write external.xpt to the file system if needed */
+			initExternal (LocationProvider.profilePath);
+
 			/* invoke appropriate Init function (based on mozilla version) */
 			initXPCOM (MozillaPath, IsXULRunner);
 		}
@@ -905,9 +908,6 @@
 		interfaceRequestor.Release ();
 		componentRegistrar.Release ();
 
-		/* write external.xpt to the file system if needed */
-		initExternal (LocationProvider.profilePath);
-
 		if (!factoriesRegistered) {
 			HelperAppLauncherDialogFactory dialogFactory = new HelperAppLauncherDialogFactory ();
 			dialogFactory.AddRef ();
@@ -1761,13 +1761,6 @@
 }
 
 void initExternal (String profilePath) {
-	/*
-	 * external.xpt does not need to be written to the file system if the
-	 * XULRunner version is >= 4 since External.java handles this case
-	 * differently than for earlier XULRunner releases.
-	 */
-	if (!IsPre_4) return;
-
 	File componentsDir = new File (profilePath, AppFileLocProvider.COMPONENTS_DIR);
 	java.io.InputStream is = Library.class.getResourceAsStream ("/external.xpt"); //$NON-NLS-1$
 	if (is != null) {