From 9fb63331872f780fe809a0b79e46b138f096f109 Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Wed, 8 Nov 2006 16:43:17 +0000 Subject: [PATCH] back out part of 346954 to fix Flash when migrating a profile from PPC to x86. b=356694 r=sayrer sr=jst --- modules/plugin/base/src/nsPluginHostImpl.cpp | 35 +++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/modules/plugin/base/src/nsPluginHostImpl.cpp b/modules/plugin/base/src/nsPluginHostImpl.cpp index f0355709583..c05c800eaba 100644 --- a/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -4882,18 +4882,19 @@ nsresult nsPluginHostImpl::ScanPluginsDirectory(nsIFile * pluginsDir, if (NS_FAILED(rv)) continue; - pluginFileinDirectory * item = new pluginFileinDirectory(); - if (!item) - return NS_ERROR_OUT_OF_MEMORY; - - // Get file mod time - PRInt64 fileModTime = LL_ZERO; - dirEntry->GetLastModifiedTime(&fileModTime); - - item->mModTime = fileModTime; - item->mFilename = filePath; - pluginFilesArray.AppendElement(item); - + if (nsPluginsDir::IsPluginFile(dirEntry)) { + pluginFileinDirectory * item = new pluginFileinDirectory(); + if (!item) + return NS_ERROR_OUT_OF_MEMORY; + + // Get file mod time + PRInt64 fileModTime = LL_ZERO; + dirEntry->GetLastModifiedTime(&fileModTime); + + item->mModTime = fileModTime; + item->mFilename = filePath; + pluginFilesArray.AppendElement(item); + } } // end round of up of plugin files // now sort the array by file modification time or by filename, if equal @@ -4942,14 +4943,8 @@ nsresult nsPluginHostImpl::ScanPluginsDirectory(nsIFile * pluginsDir, } } else { - if (nsPluginsDir::IsPluginFile(localfile)) { - // plugin file was added, flag this fact - *aPluginsChanged = PR_TRUE; - } - else { - // It's a non-plugin, so keep looping. - continue; - } + // plugin file was added, flag this fact + *aPluginsChanged = PR_TRUE; } // if we are not creating the list, just continue the loop