Bug 661260: Don't unregister plugins as content handlers just because they are unloaded. Thanks to Rodd Zurcher for his report and proposed solution. r=bsmedberg

This commit is contained in:
Josh Aas 2012-02-13 11:52:58 -05:00
parent e5f2fa1b80
commit 5504950b37
2 changed files with 3 additions and 7 deletions

View File

@ -230,6 +230,7 @@ nsPluginTag::~nsPluginTag()
NS_IMPL_ISUPPORTS1(nsPluginTag, nsIPluginTag)
#if !defined(XP_WIN) && !defined(XP_MACOSX)
static nsresult ConvertToUTF8(nsIUnicodeDecoder *aUnicodeDecoder,
nsAFlatCString& aString)
{
@ -249,6 +250,7 @@ static nsresult ConvertToUTF8(nsIUnicodeDecoder *aUnicodeDecoder,
return NS_OK;
}
#endif
nsresult nsPluginTag::EnsureMembersAreUTF8()
{
@ -529,10 +531,4 @@ void nsPluginTag::TryUnloadPlugin()
// again so the calling code should not be fooled and reload
// the library fresh
mLibrary = nsnull;
// Remove mime types added to the category manager
// only if we were made 'active' by setting the host
if (mPluginHost) {
RegisterWithCategoryManager(false, nsPluginTag::ePluginUnregister);
}
}

View File

@ -87,7 +87,7 @@ public:
PRInt64 aLastModifiedTime = 0,
bool aCanUnload = true,
bool aArgsAreUTF8 = false);
~nsPluginTag();
virtual ~nsPluginTag();
void SetHost(nsPluginHost * aHost);
void TryUnloadPlugin();