From 1a3232906d38f433f0a09cbf44a4c4bf3d75568a Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Wed, 14 Apr 2004 19:31:33 +0000 Subject: [PATCH] Clear the namespace stack on a well-formedness error, since we're clearing our state then. Bug 239546, r=sicking, sr=peterv --- content/xml/document/src/nsXMLContentSink.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/xml/document/src/nsXMLContentSink.cpp b/content/xml/document/src/nsXMLContentSink.cpp index 5f257a2d9ab8..170f5b60bbab 100644 --- a/content/xml/document/src/nsXMLContentSink.cpp +++ b/content/xml/document/src/nsXMLContentSink.cpp @@ -1363,6 +1363,10 @@ nsXMLContentSink::ReportError(const PRUnichar* aErrorText, mState = eXMLContentSinkState_InProlog; + // Since we're blowing away all the content we've created up to now, + // blow away our namespace stack too. + mNameSpaceStack.Clear(); + // Clear the current content and // prepare to set as the document root nsCOMPtr node(do_QueryInterface(mDocument));