Bug 384663, r+sr=bz

This commit is contained in:
Olli.Pettay@helsinki.fi 2007-06-18 08:43:40 -07:00
parent bc9300967d
commit 57208eb367
2 changed files with 6 additions and 4 deletions

View File

@ -3572,7 +3572,8 @@ nsGenericElement::SetAttrAndNotify(PRInt32 aNamespaceID,
NS_ENSURE_SUCCESS(rv, rv);
if (document) {
nsXBLBinding *binding = document->BindingManager()->GetBinding(this);
nsRefPtr<nsXBLBinding> binding =
document->BindingManager()->GetBinding(this);
if (binding) {
binding->AttributeChanged(aName, aNamespaceID, PR_FALSE, aNotify);
}

View File

@ -547,12 +547,13 @@ nsXBLPrototypeBinding::AttributeChanged(nsIAtom* aAttribute,
return;
// Iterate over the elements in the array.
nsIContent* content = GetImmediateChild(nsGkAtoms::content);
nsCOMPtr<nsIContent> content = GetImmediateChild(nsGkAtoms::content);
while (xblAttr) {
nsIContent* element = xblAttr->GetElement();
nsIContent *realElement = LocateInstance(aChangedElement, content,
aAnonymousContent, element);
nsCOMPtr<nsIContent> realElement = LocateInstance(aChangedElement, content,
aAnonymousContent,
element);
if (realElement) {
nsIAtom* dstAttr = xblAttr->GetDstAttribute();