Bug 680687, Follow COM rules - keep strong ref to object, r=jst

This commit is contained in:
Olli Pettay
2011-08-23 15:57:29 +03:00
parent c4e409fe3c
commit e26255bb80
6 changed files with 9 additions and 8 deletions

View File

@@ -280,7 +280,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
case eTreeOpDetach: {
nsIContent* node = *(mOne.node);
aBuilder->FlushPendingAppendNotifications();
nsIContent* parent = node->GetParent();
nsCOMPtr<nsIContent> parent = node->GetParent();
if (parent) {
nsHtml5OtherDocUpdate update(parent->GetOwnerDoc(),
aBuilder->GetDocument());
@@ -292,7 +292,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
return rv;
}
case eTreeOpAppendChildrenToNewParent: {
nsIContent* node = *(mOne.node);
nsCOMPtr<nsIContent> node = *(mOne.node);
nsIContent* parent = *(mTwo.node);
aBuilder->FlushPendingAppendNotifications();