зеркало из 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 =
|
nsRefPtr<nsMappedAttributes> mapped =
|
||||||
GetModifiableMapped(aContent, aSheet, willAdd);
|
GetModifiableMapped(aContent, aSheet, willAdd);
|
||||||
|
|
||||||
nsresult rv = mapped->SetAndTakeAttr(aLocalName, aValue);
|
mapped->SetAndTakeAttr(aLocalName, aValue);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
return MakeMappedUnique(mapped);
|
return MakeMappedUnique(mapped);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ void* nsMappedAttributes::operator new(size_t aSize, uint32_t aAttrCount) CPP_TH
|
||||||
NS_IMPL_ISUPPORTS1(nsMappedAttributes,
|
NS_IMPL_ISUPPORTS1(nsMappedAttributes,
|
||||||
nsIStyleRule)
|
nsIStyleRule)
|
||||||
|
|
||||||
nsresult
|
void
|
||||||
nsMappedAttributes::SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue)
|
nsMappedAttributes::SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(aAttrName, "null name");
|
NS_PRECONDITION(aAttrName, "null name");
|
||||||
|
@ -87,8 +87,7 @@ nsMappedAttributes::SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue)
|
||||||
if (Attrs()[i].mName.Equals(aAttrName)) {
|
if (Attrs()[i].mName.Equals(aAttrName)) {
|
||||||
Attrs()[i].mValue.Reset();
|
Attrs()[i].mValue.Reset();
|
||||||
Attrs()[i].mValue.SwapValueWith(aValue);
|
Attrs()[i].mValue.SwapValueWith(aValue);
|
||||||
|
return;
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,8 +101,6 @@ nsMappedAttributes::SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue)
|
||||||
new (&Attrs()[i].mValue) nsAttrValue();
|
new (&Attrs()[i].mValue) nsAttrValue();
|
||||||
Attrs()[i].mValue.SwapValueWith(aValue);
|
Attrs()[i].mValue.SwapValueWith(aValue);
|
||||||
++mAttrCount;
|
++mAttrCount;
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const nsAttrValue*
|
const nsAttrValue*
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
||||||
nsresult SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue);
|
void SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue);
|
||||||
const nsAttrValue* GetAttr(nsIAtom* aAttrName) const;
|
const nsAttrValue* GetAttr(nsIAtom* aAttrName) const;
|
||||||
const nsAttrValue* GetAttr(const nsAString& aAttrName) const;
|
const nsAttrValue* GetAttr(const nsAString& aAttrName) const;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче