From fa0e5ae949cdf2b4fb5111f02f8d2313bac4dd99 Mon Sep 17 00:00:00 2001 From: "mrbkap%gmail.com" Date: Fri, 16 Sep 2005 22:14:40 +0000 Subject: [PATCH] bug 308781: Don't ignore requests from the content sink to block the parser when we're handling head content in the body. r+sr=jst git-svn-id: svn://10.0.0.236/trunk@180442 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/parser/htmlparser/src/CNavDTD.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mozilla/parser/htmlparser/src/CNavDTD.cpp b/mozilla/parser/htmlparser/src/CNavDTD.cpp index 384428cc3a5..7e9e024061e 100644 --- a/mozilla/parser/htmlparser/src/CNavDTD.cpp +++ b/mozilla/parser/htmlparser/src/CNavDTD.cpp @@ -3127,7 +3127,15 @@ CNavDTD::CloseContainer(const eHTMLTags aTag, eHTMLTags aTarget,PRBool aClosedBy // close the head context now, so that body content doesn't get sucked // into the head. if (mBodyContext->GetCount() == mHeadContainerPosition) { - result = CloseHead(); + nsresult headresult = CloseHead(); + + // Note: we could be assigning NS_OK into NS_OK here, but that's ok. + // This test is to avoid a successful CloseHead result stomping over a + // request to block the parser. + if (NS_SUCCEEDED(result)) { + result = headresult; + } + mHeadContainerPosition = -1; }