зеркало из https://github.com/mozilla/gecko-dev.git
Bug 951082 - Make nsReferencedElement::Reset fail if its call to nsContentUtils::ConvertStringFromEncoding fails. r=dholbert
This commit is contained in:
Родитель
2be4cee4d3
Коммит
6207628ecb
|
@ -37,14 +37,9 @@ nsReferencedElement::Reset(nsIContent* aFromContent, nsIURI* aURI,
|
|||
nsresult rv = nsContentUtils::ConvertStringFromEncoding(charset,
|
||||
refPart,
|
||||
ref);
|
||||
if (NS_FAILED(rv)) {
|
||||
// XXX Eww. If fallible malloc failed, using a conversion method that
|
||||
// assumes UTF-8 and doesn't handle UTF-8 errors.
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=951082
|
||||
CopyUTF8toUTF16(refPart, ref);
|
||||
}
|
||||
if (ref.IsEmpty())
|
||||
if (NS_FAILED(rv) || ref.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the current document
|
||||
nsIDocument *doc = aFromContent->OwnerDoc();
|
||||
|
|
Загрузка…
Ссылка в новой задаче