mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Fix AtomImpl leaks (includes bug 32608). r=pollmann@netscape.com
This commit is contained in:
parent
15a4c992b7
commit
3de09ce54f
@ -511,7 +511,7 @@ nsComboboxControlFrame::ShowPopup(PRBool aShowPopup)
|
|||||||
// which causes the active state to be removed from the event state manager immediately after it
|
// which causes the active state to be removed from the event state manager immediately after it
|
||||||
// it the select is set to the active state.
|
// it the select is set to the active state.
|
||||||
|
|
||||||
nsCOMPtr<nsIAtom> activeAtom ( dont_QueryInterface(NS_NewAtom(kMozDropdownActive)));
|
nsCOMPtr<nsIAtom> activeAtom ( dont_AddRef(NS_NewAtom(kMozDropdownActive)));
|
||||||
if (PR_TRUE == aShowPopup) {
|
if (PR_TRUE == aShowPopup) {
|
||||||
mContent->SetAttribute(kNameSpaceID_None, activeAtom, nsAutoString(), PR_TRUE);
|
mContent->SetAttribute(kNameSpaceID_None, activeAtom, nsAutoString(), PR_TRUE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -751,6 +751,7 @@ nsHTMLFrameInnerFrame::CreateDocShell(nsIPresContext* aPresContext,
|
|||||||
value.Mid(valuePiece, 7, 1) == 1 && valuePiece.EqualsWithConversion("-")))
|
value.Mid(valuePiece, 7, 1) == 1 && valuePiece.EqualsWithConversion("-")))
|
||||||
isContent = PR_TRUE;
|
isContent = PR_TRUE;
|
||||||
}
|
}
|
||||||
|
NS_IF_RELEASE(typeAtom);
|
||||||
if (isContent) {
|
if (isContent) {
|
||||||
// The web shell's type is content.
|
// The web shell's type is content.
|
||||||
docShellAsItem->SetItemType(nsIDocShellTreeItem::typeContent);
|
docShellAsItem->SetItemType(nsIDocShellTreeItem::typeContent);
|
||||||
|
@ -751,6 +751,7 @@ nsHTMLFrameInnerFrame::CreateDocShell(nsIPresContext* aPresContext,
|
|||||||
value.Mid(valuePiece, 7, 1) == 1 && valuePiece.EqualsWithConversion("-")))
|
value.Mid(valuePiece, 7, 1) == 1 && valuePiece.EqualsWithConversion("-")))
|
||||||
isContent = PR_TRUE;
|
isContent = PR_TRUE;
|
||||||
}
|
}
|
||||||
|
NS_IF_RELEASE(typeAtom);
|
||||||
if (isContent) {
|
if (isContent) {
|
||||||
// The web shell's type is content.
|
// The web shell's type is content.
|
||||||
docShellAsItem->SetItemType(nsIDocShellTreeItem::typeContent);
|
docShellAsItem->SetItemType(nsIDocShellTreeItem::typeContent);
|
||||||
|
@ -511,7 +511,7 @@ nsComboboxControlFrame::ShowPopup(PRBool aShowPopup)
|
|||||||
// which causes the active state to be removed from the event state manager immediately after it
|
// which causes the active state to be removed from the event state manager immediately after it
|
||||||
// it the select is set to the active state.
|
// it the select is set to the active state.
|
||||||
|
|
||||||
nsCOMPtr<nsIAtom> activeAtom ( dont_QueryInterface(NS_NewAtom(kMozDropdownActive)));
|
nsCOMPtr<nsIAtom> activeAtom ( dont_AddRef(NS_NewAtom(kMozDropdownActive)));
|
||||||
if (PR_TRUE == aShowPopup) {
|
if (PR_TRUE == aShowPopup) {
|
||||||
mContent->SetAttribute(kNameSpaceID_None, activeAtom, nsAutoString(), PR_TRUE);
|
mContent->SetAttribute(kNameSpaceID_None, activeAtom, nsAutoString(), PR_TRUE);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user