Fix DEBUG-only leak with an nsCOMPtr. Add const. b=243724 r+sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@159277 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2004-07-15 19:58:57 +00:00
parent 733116fc0e
commit de29263a2e

View File

@@ -307,7 +307,8 @@ void nsBaseWidget::AddChild(nsIWidget* aChild)
//-------------------------------------------------------------------------
void nsBaseWidget::RemoveChild(nsIWidget* aChild)
{
NS_ASSERTION(aChild->GetParent() == NS_STATIC_CAST(nsIWidget*, this),
NS_ASSERTION(nsCOMPtr<nsIWidget>(dont_AddRef(aChild->GetParent())) ==
NS_STATIC_CAST(nsIWidget*, this),
"Not one of our kids!");
if (mLastChild == aChild) {
@@ -1029,7 +1030,7 @@ case _value: eventName.AssignWithConversion(_name) ; break
//////////////////////////////////////////////////////////////
struct PrefPair
{
char * name;
const char * name;
PRBool value;
};