diff --git a/content/xbl/src/nsXBLPrototypeBinding.cpp b/content/xbl/src/nsXBLPrototypeBinding.cpp index 7d1edfd0e325..7eb0f843ad11 100644 --- a/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -1848,12 +1848,6 @@ nsXBLPrototypeBinding::ReadContentNode(nsIObjectInputStream* aStream, prototype->mNodeInfo = nodeInfo; - nsCOMPtr result; - nsresult rv = - nsXULElement::Create(prototype, aDocument, false, getter_AddRefs(result)); - NS_ENSURE_SUCCESS(rv, rv); - content = result; - nsXULPrototypeAttribute* attrs = nsnull; if (attrCount > 0) { attrs = new nsXULPrototypeAttribute[attrCount]; @@ -1892,6 +1886,12 @@ nsXBLPrototypeBinding::ReadContentNode(nsIObjectInputStream* aStream, rv = prototype->SetAttrAt(i, val, documentURI); NS_ENSURE_SUCCESS(rv, rv); } + + nsCOMPtr result; + nsresult rv = + nsXULElement::Create(prototype, aDocument, false, getter_AddRefs(result)); + NS_ENSURE_SUCCESS(rv, rv); + content = result; } else { #endif