mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
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:
parent
2271cad65a
commit
0d803e1e8a
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
PRInt64 aLastModifiedTime = 0,
|
||||
bool aCanUnload = true,
|
||||
bool aArgsAreUTF8 = false);
|
||||
~nsPluginTag();
|
||||
virtual ~nsPluginTag();
|
||||
|
||||
void SetHost(nsPluginHost * aHost);
|
||||
void TryUnloadPlugin();
|
||||
|
Loading…
Reference in New Issue
Block a user