Bug 228124: Deal with documents without root-element in xml prettyprinter.
Patch by jst. r=me sr=bz git-svn-id: svn://10.0.0.236/trunk@150363 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f78cfe4b66
commit
dfa50bfa17
@ -234,9 +234,12 @@ nsXMLPrettyPrinter::EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType)
|
||||
nsCOMPtr<nsIDOMDocument> document = do_QueryInterface(mDocument);
|
||||
nsCOMPtr<nsIDOMElement> rootElem;
|
||||
document->GetDocumentElement(getter_AddRefs(rootElem));
|
||||
nsCOMPtr<nsIDOMDocumentXBL> xblDoc = do_QueryInterface(mDocument);
|
||||
xblDoc->RemoveBinding(rootElem,
|
||||
NS_LITERAL_STRING("chrome://communicator/content/xml/XMLPrettyPrint.xml#prettyprint"));
|
||||
|
||||
if (rootElem) {
|
||||
nsCOMPtr<nsIDOMDocumentXBL> xblDoc = do_QueryInterface(mDocument);
|
||||
xblDoc->RemoveBinding(rootElem,
|
||||
NS_LITERAL_STRING("chrome://communicator/content/xml/XMLPrettyPrint.xml#prettyprint"));
|
||||
}
|
||||
|
||||
mDocument = nsnull;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user