Fixing bug 70170. Making sure we unblock the parser after loading a script file even if loading the script failed or the script file was empty. r=pollmann@netscape.com, sr=rpotts@netscape.com.

This commit is contained in:
jst%netscape.com 2001-03-13 07:23:15 +00:00
Родитель 35b4693eb6
Коммит 2fb4111355
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -4728,6 +4728,14 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
{
nsresult rv = NS_OK;
if(mParser) {
// make sure to unblock the parser before evaluating the script,
// we must unblock the parser even if loading the script failed or
// if the script was empty, if we don't, the parser will never be
// unblocked.
mParser->UnblockParser();
}
if (stringLen) {
nsAutoString characterSet;
nsCOMPtr<nsIUnicodeDecoder> unicodeDecoder;
@ -4841,10 +4849,6 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
if (NS_FAILED(rv))
return rv;
if(mParser) {
mParser->UnblockParser(); // make sure to unblock the parser before evaluating the script
}
rv = EvaluateScript(mUnicodeXferBuf, mScriptURI, 1,
mScriptLanguageVersion);
if (NS_FAILED(rv))