Bug 778104 - NS_IMPL_STRING_ATTR incorrectly uses bool as nsresult; r=bz
--- a/content/base/src/nsGenericElement.h
+++ b/content/base/src/nsGenericElement.h
@@ -1046,18 +1046,18 @@ nsresult
* SetAttr methods. We use the 5-argument form of SetAttr, because
* some consumers only implement that one, hiding superclass
* 4-argument forms.
*/
#define NS_IMPL_STRING_ATTR(_class, _method, _atom) \
NS_IMETHODIMP \
_class::Get##_method(nsAString& aValue) \
{ \
- /* XXX Invalid cast of bool to nsresult (bug 778104) */ \
- return (nsresult)GetAttr(kNameSpaceID_None, nsGkAtoms::_atom, aValue); \
+ GetAttr(kNameSpaceID_None, nsGkAtoms::_atom, aValue); \
+ return NS_OK; \
} \
NS_IMETHODIMP \
_class::Set##_method(const nsAString& aValue) \
{ \
return SetAttr(kNameSpaceID_None, nsGkAtoms::_atom, nullptr, aValue, true); \
}
/**