Bug 773606 - XBL fastload creates XUL element before feeding proto attributes to the protoelement, r=enndeakin

This commit is contained in:
Olli Pettay 2012-07-14 00:25:01 +03:00
Родитель b78d8aca8c
Коммит 12601b2f2e
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1848,12 +1848,6 @@ nsXBLPrototypeBinding::ReadContentNode(nsIObjectInputStream* aStream,
prototype->mNodeInfo = nodeInfo; prototype->mNodeInfo = nodeInfo;
nsCOMPtr<Element> result;
nsresult rv =
nsXULElement::Create(prototype, aDocument, false, getter_AddRefs(result));
NS_ENSURE_SUCCESS(rv, rv);
content = result;
nsXULPrototypeAttribute* attrs = nsnull; nsXULPrototypeAttribute* attrs = nsnull;
if (attrCount > 0) { if (attrCount > 0) {
attrs = new nsXULPrototypeAttribute[attrCount]; attrs = new nsXULPrototypeAttribute[attrCount];
@ -1892,6 +1886,12 @@ nsXBLPrototypeBinding::ReadContentNode(nsIObjectInputStream* aStream,
rv = prototype->SetAttrAt(i, val, documentURI); rv = prototype->SetAttrAt(i, val, documentURI);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
} }
nsCOMPtr<Element> result;
nsresult rv =
nsXULElement::Create(prototype, aDocument, false, getter_AddRefs(result));
NS_ENSURE_SUCCESS(rv, rv);
content = result;
} }
else { else {
#endif #endif