mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 22:05:40 +00:00
Bug 538310, clean up old mimetype code, r=jst, sr=sicking
This commit is contained in:
parent
f2877b7b35
commit
52a8b32ca4
@ -102,6 +102,8 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMMIMETYPE
|
||||
|
||||
void DetachPlugin() { mPlugin = nsnull; }
|
||||
|
||||
protected:
|
||||
nsIDOMPlugin* mPlugin;
|
||||
nsCOMPtr<nsIDOMMimeType> mMimeType;
|
||||
|
@ -285,8 +285,13 @@ nsPluginElement::~nsPluginElement()
|
||||
NS_IF_RELEASE(mPlugin);
|
||||
|
||||
if (mMimeTypeArray != nsnull) {
|
||||
for (PRUint32 i = 0; i < mMimeTypeCount; i++)
|
||||
NS_IF_RELEASE(mMimeTypeArray[i]);
|
||||
for (PRUint32 i = 0; i < mMimeTypeCount; i++) {
|
||||
nsMimeType* mt = static_cast<nsMimeType*>(mMimeTypeArray[i]);
|
||||
if (mt) {
|
||||
mt->DetachPlugin();
|
||||
NS_RELEASE(mt);
|
||||
}
|
||||
}
|
||||
delete[] mMimeTypeArray;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user