Bug 1449019. Actually propagate out exceptions from the innerHTML getter. r=smaug

I moved the IgnoreErrors decl so it would come after the OOMReporter decl and I
could add the new conversion operator.

MozReview-Commit-ID: B1S6DXmZfvE
This commit is contained in:
Boris Zbarsky
2018-03-26 16:41:43 -04:00
parent 85f173eb57
commit 868eaca19e
9 changed files with 30 additions and 31 deletions

View File

@@ -136,13 +136,12 @@ HTMLScriptElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
aNotify);
}
NS_IMETHODIMP
HTMLScriptElement::GetInnerHTML(nsAString& aInnerHTML)
void
HTMLScriptElement::GetInnerHTML(nsAString& aInnerHTML, OOMReporter& aError)
{
if (!nsContentUtils::GetNodeTextContent(this, false, aInnerHTML, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
aError.ReportOOM();
}
return NS_OK;
}
void