зеркало из https://github.com/mozilla/gecko-dev.git
Bug 784768 - Remove nsresult return value of nsMappedAttributes::SetAndTakeAttr; r=khuey
This commit is contained in:
Родитель
07775477a5
Коммит
3491b055e8
|
@ -564,8 +564,7 @@ nsAttrAndChildArray::SetAndTakeMappedAttr(nsIAtom* aLocalName,
|
|||
nsRefPtr<nsMappedAttributes> mapped =
|
||||
GetModifiableMapped(aContent, aSheet, willAdd);
|
||||
|
||||
nsresult rv = mapped->SetAndTakeAttr(aLocalName, aValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mapped->SetAndTakeAttr(aLocalName, aValue);
|
||||
|
||||
return MakeMappedUnique(mapped);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ void* nsMappedAttributes::operator new(size_t aSize, uint32_t aAttrCount) CPP_TH
|
|||
NS_IMPL_ISUPPORTS1(nsMappedAttributes,
|
||||
nsIStyleRule)
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMappedAttributes::SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue)
|
||||
{
|
||||
NS_PRECONDITION(aAttrName, "null name");
|
||||
|
@ -87,8 +87,7 @@ nsMappedAttributes::SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue)
|
|||
if (Attrs()[i].mName.Equals(aAttrName)) {
|
||||
Attrs()[i].mValue.Reset();
|
||||
Attrs()[i].mValue.SwapValueWith(aValue);
|
||||
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,8 +101,6 @@ nsMappedAttributes::SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue)
|
|||
new (&Attrs()[i].mValue) nsAttrValue();
|
||||
Attrs()[i].mValue.SwapValueWith(aValue);
|
||||
++mAttrCount;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
const nsAttrValue*
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsresult SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue);
|
||||
void SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue);
|
||||
const nsAttrValue* GetAttr(nsIAtom* aAttrName) const;
|
||||
const nsAttrValue* GetAttr(const nsAString& aAttrName) const;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче