зеркало из https://github.com/mozilla/gecko-dev.git
fix for memory leak bug# 21301. MLK: ImageNetContextSyncImpl leaks. r=pnunn
This commit is contained in:
Родитель
7f18ed1382
Коммит
de2f1cc41f
|
@ -393,8 +393,8 @@ NS_IMETHODIMP DeviceContextImpl::LoadIconImage(PRInt32 aId, nsIImage*& aImage)
|
|||
sprintf(url, "resource:/res/gfx/icon_%d.gif", aId);
|
||||
|
||||
// Use a sync net context
|
||||
ilINetContext* netContext;
|
||||
result = NS_NewImageNetContextSync(&netContext);
|
||||
nsCOMPtr<ilINetContext> netContext;
|
||||
result = NS_NewImageNetContextSync(getter_AddRefs(netContext));
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
|
@ -418,7 +418,6 @@ NS_IMETHODIMP DeviceContextImpl::LoadIconImage(PRInt32 aId, nsIImage*& aImage)
|
|||
mIcons[aId] = imageReq;
|
||||
}
|
||||
|
||||
NS_RELEASE(netContext);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ class ilINetReader;
|
|||
class ilINetContext : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(IL_INETCONTEXT_IID)
|
||||
|
||||
virtual ilINetContext* Clone()=0;
|
||||
|
||||
virtual NET_ReloadMethod GetReloadPolicy()=0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче