Fix for bug 297311 (consistent crash when trying to call xmlDocument.replaceChild(newChild, xmlDocument.documentElement) on XML document rendered in a frame). r/sr=bz, a=asa.
git-svn-id: svn://10.0.0.236/trunk@174560 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -415,7 +415,9 @@ nsBindingManager::ChangeDocumentFor(nsIContent* aContent, nsIDocument* aOldDocum
|
||||
if (! aOldDocument)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsXBLBinding *binding = nsBindingManager::GetBinding(aContent);
|
||||
// Hold a ref to the binding so it won't die when we remove it from our
|
||||
// table.
|
||||
nsRefPtr<nsXBLBinding> binding = nsBindingManager::GetBinding(aContent);
|
||||
if (binding) {
|
||||
binding->ChangeDocument(aOldDocument, aNewDocument);
|
||||
SetBinding(aContent, nsnull);
|
||||
|
||||
Reference in New Issue
Block a user