backing out changes to fix 74728 as they are causing assertion death spirals in todays builds.

git-svn-id: svn://10.0.0.236/trunk@91471 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
valeski%netscape.com
2001-04-05 17:53:18 +00:00
parent 498ed06aa1
commit ff8619beb3
14 changed files with 110 additions and 150 deletions

View File

@@ -40,25 +40,7 @@ const nsString& GetEmptyString() {
/**
* Default Constructor
*/
nsCParserNode::nsCParserNode()
: mLineNumber(1),
mToken(nsnull),
mAttributes(nsnull),
mSkippedContent(nsnull),
mUseCount(0),
mGenericState(PR_FALSE),
mTokenAllocator(nsnull)
{
MOZ_COUNT_CTOR(nsCParserNode);
#ifdef HEAP_ALLOCATED_NODES
mNodeAllocator=nsnull;
#endif
}
/**
* Constructor
* Default constructor
*
* @update gess 3/25/98
* @param aToken -- token to init internal token
@@ -361,11 +343,13 @@ void nsCParserNode::GetSource(nsString& aString) {
* @return void
*/
nsresult nsCParserNode::ReleaseAll() {
NS_ASSERTION(mTokenAllocator != nsnull, "aiee! no token allocator!");
if(mAttributes) {
CToken* theAttrToken=0;
while((theAttrToken=NS_STATIC_CAST(CToken*,mAttributes->Pop()))) {
IF_FREE(theAttrToken, mTokenAllocator);
// nsViewSourceHTML.cpp:513 creates nsCParserNodes with a NULL token allocator
// need to check to see if mTokenAllocator is non-null
if(mTokenAllocator)
IF_FREE(theAttrToken, mTokenAllocator);
}
delete mAttributes;
mAttributes=0;