Clean up nsHtml5Parser destructor

This commit is contained in:
Henri Sivonen 2009-06-24 09:59:03 +03:00
parent 0a5ee2be2b
commit 0101b8870f

View File

@ -182,18 +182,15 @@ nsHtml5Parser::nsHtml5Parser()
nsHtml5Parser::~nsHtml5Parser()
{
while (mFirstBuffer->next) {
nsHtml5UTF16Buffer* oldBuf = mFirstBuffer;
mFirstBuffer = mFirstBuffer->next;
delete oldBuf;
while(mFirstBuffer) {
nsHtml5UTF16Buffer* old = mFirstBuffer;
mFirstBuffer = mFirstBuffer->next;
delete old;
}
delete mFirstBuffer;
delete mTokenizer;
delete mTreeBuilder;
if (mSniffingBuffer) {
delete[] mSniffingBuffer;
}
delete[] mSniffingBuffer;
delete mMetaScanner;
#ifdef DEBUG
delete mSnapshot;