зеркало из https://github.com/mozilla/gecko-dev.git
96440 - Before reloading the document with the new charset we should completely shutoff the current load. nsMetaCharsetObserver::Notify() does indeed result in calling stopDocumentLoad() however it failed to ( accidently ) propagate the appropriate error message back to the parser. r=ftang,sr=kin,a=dbaron.
This commit is contained in:
Родитель
6c2cc77099
Коммит
e2b0e47202
|
@ -270,10 +270,13 @@ NS_IMETHODIMP nsMetaCharsetObserver::Notify(
|
|||
!preferred.Equals(NS_LITERAL_STRING("UTF-16BE")) &&
|
||||
!preferred.Equals(NS_LITERAL_STRING("UTF-16LE")) &&
|
||||
!preferred.Equals(NS_LITERAL_STRING("UTF-32BE")) &&
|
||||
!preferred.Equals(NS_LITERAL_STRING("UTF-32LE")))
|
||||
!preferred.Equals(NS_LITERAL_STRING("UTF-32LE"))) {
|
||||
// Propagate the error message so that the parser can
|
||||
// shutdown correctly. - Ref. Bug 96440
|
||||
res = NotifyWebShell(aDocumentID,
|
||||
NS_ConvertUCS2toUTF8(preferred).get(),
|
||||
kCharsetFromMetaTag);
|
||||
NS_ConvertUCS2toUTF8(preferred).get(),
|
||||
kCharsetFromMetaTag);
|
||||
}
|
||||
} // if(NS_SUCCEEDED(res)
|
||||
}
|
||||
} // if EqualIgnoreCase
|
||||
|
@ -285,11 +288,14 @@ NS_IMETHODIMP nsMetaCharsetObserver::Notify(
|
|||
nsAutoString compatCharset;
|
||||
if (NS_SUCCEEDED(GetCharsetFromCompatibilityTag(keys, values, compatCharset)))
|
||||
{
|
||||
if (!compatCharset.IsEmpty())
|
||||
res = NotifyWebShell(aDocumentID, NS_ConvertUCS2toUTF8(compatCharset).get(), kCharsetFromMetaTag);
|
||||
if (!compatCharset.IsEmpty()) {
|
||||
res = NotifyWebShell(aDocumentID,
|
||||
NS_ConvertUCS2toUTF8(compatCharset).get(),
|
||||
kCharsetFromMetaTag);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
return res;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче