Bug 296207: Optimize nsDOMAttributeMap::SetNamedItemInternal.

r=allan sr=peterv
This commit is contained in:
cvshook@sicking.cc
2005-12-29 03:01:58 +00:00
parent d6151cf9c2
commit 3a58044067
7 changed files with 95 additions and 21 deletions

View File

@@ -1939,6 +1939,13 @@ nsGenericElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
NS_ASSERTION(newNodeInfo, "GetNodeInfo lies");
mNodeInfo.swap(newNodeInfo);
}
// set a new nodeinfo on attribute nodes
nsDOMSlots *slots = GetExistingDOMSlots();
if (slots && slots->mAttributeMap) {
rv = slots->mAttributeMap->SetOwnerDocument(aDocument);
NS_ENSURE_SUCCESS(rv, rv);
}
}
}