Bug 1829189 - Make BeforeSetAttr infallible. r=smaug
rg BeforeSetAttr -l | xargs sed -i 's/nsresult BeforeSetAttr/void BeforeSetAttr/g' rg ::BeforeSetAttr -l | xargs sed -i 's/nsresult \(.*\)::BeforeSetAttr/void \1::BeforeSetAttr/g' Plus trivial fixes, plus clang-format. The only meaningful changes are in nsXULElement::BeforeSetAttr. Two things could fail: chromemargin: I removed it because we don't use the parsed attribute any other place than here: https://searchfox.org/mozilla-central/rev/31f5847a4494b3646edabbdd7ea39cb88509afe2/dom/xul/ChromeObserver.cpp#136 And that deals just fine with it not being parsed. usercontextid: We have a debug assertion that we don't dynamically change it. I kept it but I don't think it's worth failing to set the attribute on release for that Differential Revision: https://phabricator.services.mozilla.com/D176069
This commit is contained in:
@@ -179,9 +179,9 @@ NS_IMPL_ELEMENT_CLONE(HTMLFormElement)
|
||||
|
||||
nsIHTMLCollection* HTMLFormElement::Elements() { return mControls; }
|
||||
|
||||
nsresult HTMLFormElement::BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue,
|
||||
bool aNotify) {
|
||||
void HTMLFormElement::BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue,
|
||||
bool aNotify) {
|
||||
if (aNamespaceID == kNameSpaceID_None) {
|
||||
if (aName == nsGkAtoms::action || aName == nsGkAtoms::target) {
|
||||
// Don't forget we've notified the password manager already if the
|
||||
|
||||
Reference in New Issue
Block a user