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. r=mstange
authorBrad Werth <bwerth@mozilla.com>
Wed, 12 Jul 2017 14:01:12 -0700
changeset 368809 af0a54771f69e85ba0622a6efd5cd77e9064a10e
parent 368808 5f2d5cf0714f5386ac30205bf47d7fcdba1614eb
child 368810 f999b725ef69e4a5e76d084f8a2d6ff6a467dea8
push id46431
push userbwerth@mozilla.com
push dateFri, 14 Jul 2017 00:12:17 +0000
treeherderautoland@af0a54771f69 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1380165
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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. r=mstange 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