Bug 998356. Don't completely fail out of the parser if we can't format one of our string error messages. r=hsivonen

This commit is contained in:
Boris Zbarsky 2014-05-23 17:32:37 -04:00
parent 12cf0111e5
commit 900ca9c9b2
2 changed files with 4 additions and 3 deletions

View File

@ -129,3 +129,4 @@ errSelfClosing=Self-closing syntax (“/>”) used on a non-void HTML element. I
errNoCheckUnclosedElementsOnStack=Unclosed elements on stack.
errEndTagDidNotMatchCurrentOpenElement=End tag “%1$S” did not match the name of the current open element (“%2$S”).
errEndTagViolatesNestingRules=End tag “%1$S” violates nesting rules.
errEndWithUnclosedElements=End tag for “%1$S” seen, but there were unclosed elements.

View File

@ -953,16 +953,16 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
otherAtom->GetUTF16String() };
rv = nsContentUtils::FormatLocalizedString(
nsContentUtils::eHTMLPARSER_PROPERTIES, msgId, params, message);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS(rv, NS_OK);
} else if (atom) {
const char16_t* params[] = { atom->GetUTF16String() };
rv = nsContentUtils::FormatLocalizedString(
nsContentUtils::eHTMLPARSER_PROPERTIES, msgId, params, message);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS(rv, NS_OK);
} else {
rv = nsContentUtils::GetLocalizedString(
nsContentUtils::eHTMLPARSER_PROPERTIES, msgId, message);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS(rv, NS_OK);
}
nsAutoString title;