Bug 500660 - Don't load XPT files from plugin directories any more r=josh sr=jst
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 01 Jul 2009 09:34:31 -0400
changeset 29936 0ad55acfa9794e3a52407d7e73ce3f3e17ffd7b5
parent 29935 2e0b49c6032b218b66f425ac393a573f3429cdbd
child 29937 6135c784b4582a4ea887537bb34787cbd2a32c6c
push idunknown
push userunknown
push dateunknown
reviewersjosh, jst
bugs500660
milestone1.9.2a1pre
Bug 500660 - Don't load XPT files from plugin directories any more r=josh sr=jst
modules/plugin/base/src/nsPluginHostImpl.cpp
xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
--- a/modules/plugin/base/src/nsPluginHostImpl.cpp
+++ b/modules/plugin/base/src/nsPluginHostImpl.cpp
@@ -4496,25 +4496,18 @@ NS_IMETHODIMP nsPluginHostImpl::LoadPlug
   if (mPluginsLoaded)
     return NS_OK;
 
   PRBool pluginschanged;
   nsresult rv = FindPlugins(PR_TRUE, &pluginschanged);
   if (NS_FAILED(rv))
     return rv;
 
-  // only if plugins have changed will we ask XPTI to refresh
+  // only if plugins have changed will we notify plugin-change observers
   if (pluginschanged) {
-    // rescan XPTI to catch any newly installed interfaces
-    nsCOMPtr<nsIInterfaceInfoManager>
-      iim(do_GetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID));
-
-    if (iim)
-      iim->AutoRegisterInterfaces();
-
     nsCOMPtr<nsIObserverService>
       obsService(do_GetService("@mozilla.org/observer-service;1"));
     if (obsService)
       obsService->NotifyObservers(nsnull, "plugins-list-updated", nsnull);
   }
 
   return NS_OK;
 }
--- a/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
+++ b/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
@@ -247,17 +247,16 @@ PRBool xptiInterfaceInfoManager::BuildFi
 
     if(NS_FAILED(GetDirectoryFromDirService(NS_XPCOM_COMPONENT_DIR, 
                                             getter_AddRefs(compDir))) ||
        !searchPath->AppendElement(compDir))
     {
         return PR_FALSE;
     }
 
-    // Add additional plugins dirs
     // No error checking here since this is optional in some embeddings
     
     // Add the GRE's component directory to searchPath if the 
     // application is using an GRE.
     // An application indicates that it's using an GRE by returning
     // a valid nsIFile via its directory service provider interface.
     //
     // Please see http://www.mozilla.org/projects/embedding/MRE.html
@@ -272,17 +271,16 @@ PRBool xptiInterfaceInfoManager::BuildFi
         PRBool equalsCompDir = PR_FALSE;
         greComponentDirectory->Equals(compDir, &equalsCompDir);
 
         if(!equalsCompDir)
             searchPath->AppendElement(greComponentDirectory);
     }
 
     (void)AppendFromDirServiceList(NS_XPCOM_COMPONENT_DIR_LIST, searchPath);
-    (void)AppendFromDirServiceList(NS_APP_PLUGINS_DIR_LIST, searchPath);
 
     NS_ADDREF(*aPath = searchPath);
     return PR_TRUE;
 }
 
 PRBool 
 xptiInterfaceInfoManager::GetCloneOfManifestLocation(nsILocalFile** aFile)
 {