mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 22:44:13 +00:00
starting to clean up ownership model
This commit is contained in:
parent
7bae157253
commit
0b9c5ff3df
@ -116,17 +116,18 @@ NS_METHOD nsMenuBar::Create(nsIWidget *aParent)
|
||||
NS_METHOD nsMenuBar::GetParent(nsIWidget *&aParent)
|
||||
{
|
||||
aParent = mParent;
|
||||
NS_IF_ADDREF(aParent);
|
||||
// Bad monkey. Don't addref parent since we don't own the parent
|
||||
//NS_IF_ADDREF(aParent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsMenuBar::SetParent(nsIWidget *aParent)
|
||||
{
|
||||
|
||||
NS_IF_RELEASE(mParent);
|
||||
// We don't own the parent, we shouldn't be addrefing it
|
||||
//NS_IF_RELEASE(mParent);
|
||||
mParent = aParent;
|
||||
NS_IF_ADDREF(mParent);
|
||||
//NS_IF_ADDREF(mParent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user