Bug 1708228 - Part 1: Remove redundant flushing from HTMLFormControlsCollection r=smaug

This was done in bug 324828 to workaround bug 22480 but shouldn't be needed anymore.

Differential Revision: https://phabricator.services.mozilla.com/D113805
This commit is contained in:
Kagami Sascha Rosylight
2021-04-30 11:25:22 +00:00
parent 965689b82e
commit 86f808f056
4 changed files with 10 additions and 36 deletions

View File

@@ -1486,7 +1486,7 @@ already_AddRefed<nsISupports> HTMLFormElement::NamedGetter(
const nsAString& aName, bool& aFound) {
aFound = true;
nsCOMPtr<nsISupports> result = DoResolveName(aName, true);
nsCOMPtr<nsISupports> result = DoResolveName(aName);
if (result) {
AddToPastNamesMap(aName, result);
return result.forget();
@@ -1526,9 +1526,8 @@ already_AddRefed<nsISupports> HTMLFormElement::FindNamedItem(
}
already_AddRefed<nsISupports> HTMLFormElement::DoResolveName(
const nsAString& aName, bool aFlushContent) {
nsCOMPtr<nsISupports> result =
mControls->NamedItemInternal(aName, aFlushContent);
const nsAString& aName) {
nsCOMPtr<nsISupports> result = mControls->NamedItemInternal(aName);
return result.forget();
}