зеркало из https://github.com/mozilla/gecko-dev.git
Fix GetAttributes() in XUL to work right. Bug 169825, r=sicking, sr=peterv
This commit is contained in:
Родитель
eb2d62de83
Коммит
24ea48e040
|
@ -841,9 +841,8 @@ nsXULElement::GetNextSibling(nsIDOMNode** aNextSibling)
|
|||
NS_IMETHODIMP
|
||||
nsXULElement::GetAttributes(nsIDOMNamedNodeMap** aAttributes)
|
||||
{
|
||||
nsresult rv;
|
||||
if (! Attributes()) {
|
||||
// We fault everything, until we can fix nsXULAttributes
|
||||
// We fault everything (since the caller will be able to set and
|
||||
// remove attributes at will, and may try to enumerate them).
|
||||
#ifdef DEBUG_ATTRIBUTE_STATS
|
||||
if (mPrototype) {
|
||||
gFaults.GetAttributes++; gFaults.Total++;
|
||||
|
@ -852,7 +851,7 @@ nsXULElement::GetAttributes(nsIDOMNamedNodeMap** aAttributes)
|
|||
}
|
||||
#endif
|
||||
|
||||
rv = MakeHeavyweight();
|
||||
nsresult rv = MakeHeavyweight();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (! Attributes()) {
|
||||
|
@ -862,7 +861,6 @@ nsXULElement::GetAttributes(nsIDOMNamedNodeMap** aAttributes)
|
|||
|
||||
mSlots->SetAttributes(attrs);
|
||||
}
|
||||
}
|
||||
|
||||
*aAttributes = Attributes();
|
||||
NS_ADDREF(*aAttributes);
|
||||
|
|
Загрузка…
Ссылка в новой задаче