Bug 485537. window.plugins.refresh() shouldn't reregister XPCOM components. r=josh, sr=jst

This commit is contained in:
Boris Zbarsky 2009-04-04 00:14:59 -04:00
parent 47404b1311
commit f22cd238b7

View File

@ -42,13 +42,11 @@
#include "nsIScriptGlobalObject.h"
#include "nsIDOMNavigator.h"
#include "nsIDOMMimeType.h"
#include "nsIServiceManager.h"
#include "nsIPluginHost.h"
#include "nsIDocShell.h"
#include "nsIWebNavigation.h"
#include "nsDOMClassInfo.h"
#include "nsPluginError.h"
#include "nsIComponentRegistrar.h"
#include "nsContentUtils.h"
static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID);
@ -203,13 +201,6 @@ nsPluginArray::Refresh(PRBool aReloadDocuments)
if (!AllowPlugins())
return NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA;
// refresh the component registry first, see bug 87913
nsCOMPtr<nsIServiceManager> servManager;
NS_GetServiceManager(getter_AddRefs(servManager));
nsCOMPtr<nsIComponentRegistrar> registrar = do_QueryInterface(servManager);
if (registrar)
registrar->AutoRegister(nsnull);
if (!mPluginHost) {
mPluginHost = do_GetService(kPluginManagerCID, &res);
}