Bug 444963: Java hangs browser. Release branch landing. r+sr=peterv
--- 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) {