зеркало из https://github.com/mozilla/gecko-dev.git
leak removal; r=harishd
This commit is contained in:
Родитель
ce48b070b6
Коммит
98a702ed89
|
@ -2451,7 +2451,6 @@ nsresult CNavDTD::OpenTransientStyles(eHTMLTags aChildTag){
|
|||
nsTagEntry *theEntry=theStack->mEntries;
|
||||
for(sindex=0;sindex<theStack->mCount;sindex++){
|
||||
nsCParserNode* theNode=(nsCParserNode*)theEntry->mNode;
|
||||
theEntry++;
|
||||
if(1==theNode->mUseCount) {
|
||||
eHTMLTags theNodeTag=(eHTMLTags)theNode->GetNodeType();
|
||||
if(gHTMLElements[theNodeTag].CanContain(aChildTag)) {
|
||||
|
@ -2467,6 +2466,7 @@ nsresult CNavDTD::OpenTransientStyles(eHTMLTags aChildTag){
|
|||
theEntry--; //back up by one
|
||||
}
|
||||
} //if
|
||||
theEntry++;
|
||||
} //for
|
||||
} //if
|
||||
} //for
|
||||
|
|
|
@ -86,6 +86,13 @@ nsCParserNode::~nsCParserNode() {
|
|||
|
||||
if(mRecycler) {
|
||||
RecycleTokens(mRecycler,*mAttributes);
|
||||
}
|
||||
else {
|
||||
CToken* theToken=(CToken*)mAttributes->Pop();
|
||||
while(theToken){
|
||||
delete theToken;
|
||||
theToken=(CToken*)mAttributes->Pop();
|
||||
}
|
||||
}
|
||||
delete mAttributes;
|
||||
mAttributes=0;
|
||||
|
@ -343,3 +350,5 @@ CToken* nsCParserNode::PopAttributeToken() {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -329,9 +329,10 @@ nsresult CViewSourceHTML::WillBuildModel( const CParserContext& aParserContext,
|
|||
//now let's automatically open the root container...
|
||||
CToken theToken("viewsource");
|
||||
nsCParserNode theNode(&theToken,0);
|
||||
CAttributeToken theAttr("xmlns","http://www.mozilla.org/viewsource");
|
||||
|
||||
theNode.AddAttribute(&theAttr);
|
||||
CAttributeToken *theAttr=new CAttributeToken("xmlns","http://www.mozilla.org/viewsource");
|
||||
if(theAttr)
|
||||
theNode.AddAttribute(theAttr);
|
||||
mSink->OpenContainer(theNode);
|
||||
}
|
||||
|
||||
|
@ -341,7 +342,7 @@ nsresult CViewSourceHTML::WillBuildModel( const CParserContext& aParserContext,
|
|||
else mDocType=aParserContext.mDocType;
|
||||
|
||||
mLineNumber=0;
|
||||
result = mSink->WillBuildModel();
|
||||
result = mSink->WillBuildModel();
|
||||
|
||||
START_TIMER();
|
||||
return result;
|
||||
|
|
|
@ -2451,7 +2451,6 @@ nsresult CNavDTD::OpenTransientStyles(eHTMLTags aChildTag){
|
|||
nsTagEntry *theEntry=theStack->mEntries;
|
||||
for(sindex=0;sindex<theStack->mCount;sindex++){
|
||||
nsCParserNode* theNode=(nsCParserNode*)theEntry->mNode;
|
||||
theEntry++;
|
||||
if(1==theNode->mUseCount) {
|
||||
eHTMLTags theNodeTag=(eHTMLTags)theNode->GetNodeType();
|
||||
if(gHTMLElements[theNodeTag].CanContain(aChildTag)) {
|
||||
|
@ -2467,6 +2466,7 @@ nsresult CNavDTD::OpenTransientStyles(eHTMLTags aChildTag){
|
|||
theEntry--; //back up by one
|
||||
}
|
||||
} //if
|
||||
theEntry++;
|
||||
} //for
|
||||
} //if
|
||||
} //for
|
||||
|
|
|
@ -86,6 +86,13 @@ nsCParserNode::~nsCParserNode() {
|
|||
|
||||
if(mRecycler) {
|
||||
RecycleTokens(mRecycler,*mAttributes);
|
||||
}
|
||||
else {
|
||||
CToken* theToken=(CToken*)mAttributes->Pop();
|
||||
while(theToken){
|
||||
delete theToken;
|
||||
theToken=(CToken*)mAttributes->Pop();
|
||||
}
|
||||
}
|
||||
delete mAttributes;
|
||||
mAttributes=0;
|
||||
|
@ -343,3 +350,5 @@ CToken* nsCParserNode::PopAttributeToken() {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -329,9 +329,10 @@ nsresult CViewSourceHTML::WillBuildModel( const CParserContext& aParserContext,
|
|||
//now let's automatically open the root container...
|
||||
CToken theToken("viewsource");
|
||||
nsCParserNode theNode(&theToken,0);
|
||||
CAttributeToken theAttr("xmlns","http://www.mozilla.org/viewsource");
|
||||
|
||||
theNode.AddAttribute(&theAttr);
|
||||
CAttributeToken *theAttr=new CAttributeToken("xmlns","http://www.mozilla.org/viewsource");
|
||||
if(theAttr)
|
||||
theNode.AddAttribute(theAttr);
|
||||
mSink->OpenContainer(theNode);
|
||||
}
|
||||
|
||||
|
@ -341,7 +342,7 @@ nsresult CViewSourceHTML::WillBuildModel( const CParserContext& aParserContext,
|
|||
else mDocType=aParserContext.mDocType;
|
||||
|
||||
mLineNumber=0;
|
||||
result = mSink->WillBuildModel();
|
||||
result = mSink->WillBuildModel();
|
||||
|
||||
START_TIMER();
|
||||
return result;
|
||||
|
|
Загрузка…
Ссылка в новой задаче