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:
@@ -822,9 +822,9 @@ void HTMLTextAreaElement::UnbindFromTree(bool aNullParent) {
|
||||
UpdateState(false);
|
||||
}
|
||||
|
||||
nsresult HTMLTextAreaElement::BeforeSetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue,
|
||||
bool aNotify) {
|
||||
void HTMLTextAreaElement::BeforeSetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
||||
const nsAttrValueOrString* aValue,
|
||||
bool aNotify) {
|
||||
if (aNotify && aName == nsGkAtoms::disabled &&
|
||||
aNameSpaceID == kNameSpaceID_None) {
|
||||
mDisabledChanged = true;
|
||||
|
||||
Reference in New Issue
Block a user