Fixing 157627 -- prevent unnecessary writing plugin info to registry which causes indefinite bloat, r=av, sr=dveditz, a=asa

This commit is contained in:
av%netscape.com 2002-07-23 02:18:44 +00:00
parent b4f60adb92
commit 0555c49b12

View File

@ -5572,6 +5572,19 @@ nsPluginHostImpl::LoadXPCOMPlugins(nsIComponentManager* aComponentManager)
PRBool bAddIt = PR_TRUE; PRBool bAddIt = PR_TRUE;
// Find the same plugin in our cache and mark it as 'unwanted' so this plugin will
// just be added to the list without being detected as new.
// Note: Our XPCOM plugin probably shouldn't be in this list. If it is, it has been
// cached twice in the registry:
// a) ApplicationComponentRegistry: probably by the installer or regxpcom
// b) ApplicationRegistry: by us in |nsPluginHostImpl::CachePluginsInfo|
nsPluginTag *cachedTag = RemoveCachedPluginsInfo(filename.get());
if (cachedTag) {
cachedTag->Mark(NS_PLUGIN_FLAG_UNWANTED);
cachedTag->mNext = mCachedPlugins;
mCachedPlugins = cachedTag;
}
// skip it if we already have it // skip it if we already have it
if (HaveSamePlugin(tag)) if (HaveSamePlugin(tag))
bAddIt = PR_FALSE; bAddIt = PR_FALSE;