Bug 1685421 - Part 2: Stop using NS_ERROR_DOM_HIERARCHY_REQUEST_ERR in nsINode; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D113344
This commit is contained in:
@@ -179,17 +179,16 @@ void HTMLSelectElement::GetAutocompleteInfo(AutocompleteInfo& aInfo) {
|
||||
attributeVal, aInfo, mAutocompleteInfoState, true);
|
||||
}
|
||||
|
||||
nsresult HTMLSelectElement::InsertChildBefore(nsIContent* aKid,
|
||||
nsIContent* aBeforeThis,
|
||||
bool aNotify) {
|
||||
void HTMLSelectElement::InsertChildBefore(nsIContent* aKid,
|
||||
nsIContent* aBeforeThis, bool aNotify,
|
||||
ErrorResult& aRv) {
|
||||
int32_t index = aBeforeThis ? ComputeIndexOf(aBeforeThis) : GetChildCount();
|
||||
SafeOptionListMutation safeMutation(this, this, aKid, index, aNotify);
|
||||
nsresult rv = nsGenericHTMLFormElementWithState::InsertChildBefore(
|
||||
aKid, aBeforeThis, aNotify);
|
||||
if (NS_FAILED(rv)) {
|
||||
nsGenericHTMLFormElementWithState::InsertChildBefore(aKid, aBeforeThis,
|
||||
aNotify, aRv);
|
||||
if (aRv.Failed()) {
|
||||
safeMutation.MutationFailed();
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
void HTMLSelectElement::RemoveChildNode(nsIContent* aKid, bool aNotify) {
|
||||
|
||||
Reference in New Issue
Block a user