Bug 1163105 - Make nsReferencedElement work with referencing elements that are not in their document's DOM tree. r=roc

This commit is contained in:
Markus Stange 2015-05-28 16:59:00 -04:00
parent dc7e714724
commit ca3c31219b

View File

@ -47,7 +47,7 @@ nsReferencedElement::Reset(nsIContent* aFromContent, nsIURI* aURI,
return;
// Get the current document
nsIDocument *doc = aFromContent->GetComposedDoc();
nsIDocument *doc = aFromContent->OwnerDoc();
if (!doc)
return;
@ -124,7 +124,7 @@ void
nsReferencedElement::ResetWithID(nsIContent* aFromContent, const nsString& aID,
bool aWatch)
{
nsIDocument *doc = aFromContent->GetComposedDoc();
nsIDocument *doc = aFromContent->OwnerDoc();
if (!doc)
return;