diff --git a/content/base/test/Makefile.in b/content/base/test/Makefile.in index 52440578b256..23ad6dea33c7 100644 --- a/content/base/test/Makefile.in +++ b/content/base/test/Makefile.in @@ -260,7 +260,6 @@ _TEST_FILES1 = test_bug5141.html \ test_bug505783.html \ test_bug457746.html \ test_bug587931.html \ - test_bug592829.html \ test_bug518104.html \ bug457746.sjs \ test_CrossSiteXHR.html \ diff --git a/content/base/test/test_bug592829.html b/content/base/test/test_bug592829.html deleted file mode 100644 index 2d573f5a0970..000000000000 --- a/content/base/test/test_bug592829.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - Test for Bug 592829 - - - - - -Mozilla Bug 592829 -
-
-
- - diff --git a/content/xml/document/src/nsXMLContentSink.cpp b/content/xml/document/src/nsXMLContentSink.cpp index 12ded7c2c30d..39faef537e85 100644 --- a/content/xml/document/src/nsXMLContentSink.cpp +++ b/content/xml/document/src/nsXMLContentSink.cpp @@ -871,14 +871,15 @@ nsXMLContentSink::GetCurrentContent() if (mContentStack.Length() == 0) { return nsnull; } - return GetCurrentStackNode()->mContent; + return GetCurrentStackNode().mContent; } -StackNode* +StackNode & nsXMLContentSink::GetCurrentStackNode() { PRInt32 count = mContentStack.Length(); - return count != 0 ? &mContentStack[count-1] : nsnull; + NS_ASSERTION(count > 0, "Bogus Length()"); + return mContentStack[count-1]; } @@ -1115,14 +1116,11 @@ nsXMLContentSink::HandleEndElement(const PRUnichar *aName, FlushText(); - StackNode* sn = GetCurrentStackNode(); - if (!sn) { - return NS_ERROR_UNEXPECTED; - } + StackNode & sn = GetCurrentStackNode(); nsCOMPtr content; - sn->mContent.swap(content); - PRUint32 numFlushed = sn->mNumFlushed; + sn.mContent.swap(content); + PRUint32 numFlushed = sn.mNumFlushed; PopContent(); NS_ASSERTION(content, "failed to pop content"); diff --git a/content/xml/document/src/nsXMLContentSink.h b/content/xml/document/src/nsXMLContentSink.h index 8c455801712f..814d7bd7ccab 100644 --- a/content/xml/document/src/nsXMLContentSink.h +++ b/content/xml/document/src/nsXMLContentSink.h @@ -148,7 +148,7 @@ protected: nsresult AddContentAsLeaf(nsIContent *aContent); nsIContent* GetCurrentContent(); - StackNode* GetCurrentStackNode(); + StackNode & GetCurrentStackNode(); nsresult PushContent(nsIContent *aContent); void PopContent(); PRBool HaveNotifiedForCurrentContent() const;