зеркало из https://github.com/mozilla/pjs.git
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.
This commit is contained in:
Родитель
b49516c3c9
Коммит
405bcfcebe
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче