Bug 1380165 Part 1: Remove no-longer-used NS_MACOSX_JAVA2_PLUGIN_DIR variable and a comment that referenced a closed bug that conditionally used it. draft
authorBrad Werth <bwerth@mozilla.com>
Wed, 12 Jul 2017 14:01:12 -0700
changeset 607760 926f11ffe7ba183c884ca2c51280bce517f8e232
parent 607759 fad9d93a2bd7319c90846d05a9af99c95ab10270
child 637141 189966a63a46676da1a3a0855f6aa1eb7d0a767e
push id68103
push userbwerth@mozilla.com
push dateWed, 12 Jul 2017 21:01:36 +0000
bugs1380165
milestone56.0a1
Bug 1380165 Part 1: Remove no-longer-used NS_MACOSX_JAVA2_PLUGIN_DIR variable and a comment that referenced a closed bug that conditionally used it. MozReview-Commit-ID: 7Qbel0gmEAI
xpcom/io/nsAppFileLocationProvider.cpp
--- a/xpcom/io/nsAppFileLocationProvider.cpp
+++ b/xpcom/io/nsAppFileLocationProvider.cpp
@@ -45,17 +45,16 @@
 
 // Locally defined keys used by nsAppDirectoryEnumerator
 #define NS_ENV_PLUGINS_DIR          "EnvPlugins"    // env var MOZ_PLUGIN_PATH
 #define NS_USER_PLUGINS_DIR         "UserPlugins"
 
 #ifdef MOZ_WIDGET_COCOA
 #define NS_MACOSX_USER_PLUGIN_DIR   "OSXUserPlugins"
 #define NS_MACOSX_LOCAL_PLUGIN_DIR  "OSXLocalPlugins"
-#define NS_MACOSX_JAVA2_PLUGIN_DIR  "OSXJavaPlugins"
 #elif XP_UNIX
 #define NS_SYSTEM_PLUGINS_DIR       "SysPlugins"
 #endif
 
 #define DEFAULTS_DIR_NAME           NS_LITERAL_CSTRING("defaults")
 #define DEFAULTS_PREF_DIR_NAME      NS_LITERAL_CSTRING("pref")
 #define RES_DIR_NAME                NS_LITERAL_CSTRING("res")
 #define CHROME_DIR_NAME             NS_LITERAL_CSTRING("chrome")
@@ -153,21 +152,16 @@ nsAppFileLocationProvider::GetFile(const
   } else if (nsCRT::strcmp(aProp, NS_MACOSX_LOCAL_PLUGIN_DIR) == 0) {
     if (::FSFindFolder(kLocalDomain, kInternetPlugInFolderType, false,
                        &fileRef) == noErr) {
       rv = NS_NewLocalFileWithFSRef(&fileRef, true, getter_AddRefs(macFile));
       if (NS_SUCCEEDED(rv)) {
         localFile = macFile;
       }
     }
-  } else if (nsCRT::strcmp(aProp, NS_MACOSX_JAVA2_PLUGIN_DIR) == 0) {
-    static const char* const java2PluginDirPath =
-      "/System/Library/Java/Support/Deploy.bundle/Contents/Resources/";
-    rv = NS_NewNativeLocalFile(nsDependentCString(java2PluginDirPath), true,
-                               getter_AddRefs(localFile));
   }
 #else
   else if (nsCRT::strcmp(aProp, NS_ENV_PLUGINS_DIR) == 0) {
     NS_ERROR("Don't use nsAppFileLocationProvider::GetFile(NS_ENV_PLUGINS_DIR, ...). "
              "Use nsAppFileLocationProvider::GetFiles(...).");
     const char* pathVar = PR_GetEnv("MOZ_PLUGIN_PATH");
     if (pathVar && *pathVar)
       rv = NS_NewNativeLocalFile(nsDependentCString(pathVar), true,
@@ -537,23 +531,16 @@ nsAppFileLocationProvider::GetFiles(cons
   if (NS_WARN_IF(!aResult)) {
     return NS_ERROR_INVALID_ARG;
   }
   *aResult = nullptr;
   nsresult rv = NS_ERROR_FAILURE;
 
   if (!nsCRT::strcmp(aProp, NS_APP_PLUGINS_DIR_LIST)) {
 #ifdef MOZ_WIDGET_COCOA
-    // As of Java for Mac OS X 10.5 Update 10, Apple has (in effect) deprecated Java Plugin2 on
-    // on OS X 10.5, and removed the soft link to it from /Library/Internet Plug-Ins/.  Java
-    // Plugin2 is still present and usable, but there are no longer any links to it in the
-    // "normal" locations.  So we won't be able to find it unless we look in the "non-normal"
-    // location where it actually is.  Safari can use the WebKit-specific JavaPluginCocoa.bundle,
-    // which (of course) is still fully supported on OS X 10.5.  But we have no alternative to
-    // using Java Plugin2.  For more information see bug 668639.
     static const char* keys[] = {
       NS_APP_PLUGINS_DIR,
       NS_MACOSX_USER_PLUGIN_DIR,
       NS_MACOSX_LOCAL_PLUGIN_DIR,
       nullptr
     };
     *aResult = new nsAppDirectoryEnumerator(this, keys);
 #else