зеркало из https://github.com/mozilla/gecko-dev.git
fix bug 36805 - was leaking xptiInterfaceGuts by unconditionally overwriting a union
This commit is contained in:
Родитель
3b2b23e4af
Коммит
18fcb10e12
|
@ -82,6 +82,19 @@ xptiInterfaceInfo::~xptiInterfaceInfo()
|
|||
delete mInterface;
|
||||
}
|
||||
|
||||
void
|
||||
xptiInterfaceInfo::Invalidate()
|
||||
{
|
||||
if(IsValid())
|
||||
{
|
||||
// The order of operations here is important!
|
||||
xptiTypelib typelib = GetTypelibRecord();
|
||||
if(HasInterfaceRecord())
|
||||
delete mInterface;
|
||||
mTypelib = typelib;
|
||||
mName = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
xptiInterfaceInfo::Resolve(xptiWorkingSet* aWorkingSet /* = nsnull */)
|
||||
|
|
|
@ -487,15 +487,7 @@ public:
|
|||
PRBool PartiallyResolveLocked(XPTInterfaceDescriptor* aDescriptor,
|
||||
xptiWorkingSet* aWorkingSet);
|
||||
|
||||
void Invalidate()
|
||||
{
|
||||
if(IsValid())
|
||||
{
|
||||
xptiTypelib typelib = GetTypelibRecord();
|
||||
mTypelib = typelib;
|
||||
mName = nsnull;
|
||||
}
|
||||
}
|
||||
void Invalidate();
|
||||
|
||||
private:
|
||||
void CopyName(const char* name,
|
||||
|
|
Загрузка…
Ссылка в новой задаче