fix bug 36805 - was leaking xptiInterfaceGuts by unconditionally overwriting a union

git-svn-id: svn://10.0.0.236/trunk@66844 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jband%netscape.com
2000-04-22 06:30:46 +00:00
parent b8b53007ad
commit 3f9f054e71
2 changed files with 14 additions and 9 deletions

View File

@@ -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 */)

View File

@@ -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,