Bug 444963: Java hangs browser. Release branch landing. r+sr=peterv FIREFOX_3_1a1_BUILD2 FIREFOX_3_1a1_RELEASE
authorJohnny Stenback <jst@mozilla.org>
Fri, 25 Jul 2008 12:42:08 -0400
changeset 16209 afc4ee509d9c
parent 16136 9d9941eacb14
child 16210 c1d7e318a275
push idunknown
push userunknown
push dateunknown
bugs444963
milestone1.9.1a1
Bug 444963: Java hangs browser. Release branch landing. r+sr=peterv
modules/plugin/base/src/nsPluginHostImpl.cpp
--- a/modules/plugin/base/src/nsPluginHostImpl.cpp
+++ b/modules/plugin/base/src/nsPluginHostImpl.cpp
@@ -3974,16 +3974,22 @@ nsPluginHostImpl::TrySetUpPluginInstance
   }
   else
     mimetype = aMimeType;
 
   NS_ASSERTION(pluginTag, "Must have plugin tag here!");
   PRBool isJavaPlugin = pluginTag->mIsJavaPlugin;
 
   if (isJavaPlugin && !pluginTag->mIsNPRuntimeEnabledJavaPlugin) {
+#if !defined(OJI) && defined(XP_MACOSX)
+    // The MRJ plugin hangs if you try to load it with OJI disabled,
+    // don't even try to go there.
+    return NS_ERROR_FAILURE;
+#endif
+
     // We must make sure LiveConnect is started, if needed.
     nsCOMPtr<nsIDocument> document;
     aOwner->GetDocument(getter_AddRefs(document));
     if (document) {
       nsCOMPtr<nsPIDOMWindow> window =
         do_QueryInterface(document->GetScriptGlobalObject());
 
       if (window) {