From 93667439d7f0c15fcdd67fce3fedfabc26fb7729 Mon Sep 17 00:00:00 2001 From: "mrbkap%gmail.com" Date: Wed, 18 Feb 2009 01:01:14 +0000 Subject: [PATCH] Bug 460706 - Handle misplaced ContinueInterruptedParsing calls during synchronous XMLHttpRequest. r+sr=sicking a=dveditz git-svn-id: svn://10.0.0.236/trunk@256246 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/parser/htmlparser/src/nsParser.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index 47f4fcabbf8..55828ef0ee2 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -1157,6 +1157,13 @@ nsParser::ContinueParsing() NS_IMETHODIMP nsParser::ContinueInterruptedParsing() { + // If there are scripts executing, then the content sink is jumping the gun + // (probably due to a synchronous XMLHttpRequest) and will re-enable us + // later, see bug 460706. + if (mScriptsExecuting) { + return NS_OK; + } + // If the stream has already finished, there's a good chance // that we might start closing things down when the parser // is reenabled. To make sure that we're not deleted across