nsIRDFNode* parent = (nsIRDFNode*) mStack[mStack.Count() - 1]; PR_ASSERT(parent); if (! parent) return;
if (mStack.Count() > 0) {  nsAutoString folderURI(kURI_bookmarks); folderURI.Append('#'); folderURI.Append(++mCounter, 10);
BookmarkParser::NextToken(void){    if (mLine[0] == '<') {        DoStateTransition();        return;    }    /* ok, we have a piece of content. can be the title, or a description */    if ((mState == eBookmarkParserState_InTitle) ||        (mState == eBookmarkParserState_InH3)) {        // Create a new folder        nsAutoString folderURI(kURI_bookmarks);        folderURI.Append('#');        folderURI.Append(++mCounter, 10);        nsIRDFNode* parent = (nsIRDFNode*) mStack[mStack.Count() - 1];        PR_ASSERT(parent);        if (! parent)            return;        nsIRDFNode* folder;        if (NS_FAILED(mResourceMgr->GetNode(folderURI, folder)))            return;        rdf_Assert(mResourceMgr, mDataSource, parent, kURINC_Folder, folder);        if (mFolderDate.Length()) {            AssertTime(folder, kURINC_BookmarkAddDate, mFolderDate);            mFolderDate.Truncate();        }        NS_IF_RELEASE(mLastItem);        mLastItem = folder;        if (mState != eBookmarkParserState_InTitle)            rdf_Assert(mResourceMgr, mDataSource, mLastItem, kURINC_Name, mLine);        if (mLine.Find(kPersonalToolbar) == 0)            rdf_Assert(mResourceMgr, mDataSource, mLastItem, kURIRDF_instanceOf, kURINC_PersonalToolbarFolderCategory);    }    else if (mState == eBookmarkParserState_InItemTitle) {        PR_ASSERT(mLastItem);        if (! mLastItem)            return;        rdf_Assert(mResourceMgr, mDataSource, mLastItem, kURINC_Name, mLine);        NS_IF_RELEASE(mLastItem);    }    else if (mState == eBookmarkParserState_InItemDescription) {        rdf_Assert(mResourceMgr, mDataSource, mLastItem, kURINC_Description, mLine);    }}