зеркало из https://github.com/mozilla/gecko-dev.git
More refcount fixes.
This commit is contained in:
Родитель
d0dae6108a
Коммит
9607ce5a66
|
@ -269,7 +269,7 @@ nsIEnumerator* nsRadioGroup::GetChildren()
|
|||
|
||||
nsRadioGroup::Enumerator::Enumerator()
|
||||
{
|
||||
mRefCnt = 1;
|
||||
mRefCnt = 0;
|
||||
mArraySize = INITIAL_SIZE;
|
||||
mChildrens = (nsIRadioButton**)new DWORD[mArraySize];
|
||||
memset(mChildrens, 0, sizeof(DWORD) * mArraySize);
|
||||
|
|
|
@ -680,15 +680,14 @@ nsIEnumerator* nsWindow::GetChildren()
|
|||
{
|
||||
if (mChildren) {
|
||||
mChildren->Reset();
|
||||
//mChildren->AddRef();
|
||||
|
||||
Enumerator * children = new Enumerator();
|
||||
children->AddRef();
|
||||
nsISupports * next = mChildren->Next();
|
||||
if (next) {
|
||||
nsIWidget *widget;
|
||||
if (NS_OK == next->QueryInterface(kIWidgetIID, (void**)&widget)) {
|
||||
children->Append(widget);
|
||||
//NS_RELEASE(widget);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1964,7 +1963,7 @@ HBRUSH nsWindow::OnControlColor()
|
|||
|
||||
nsWindow::Enumerator::Enumerator()
|
||||
{
|
||||
mRefCnt = 1;
|
||||
mRefCnt = 0;
|
||||
mArraySize = INITIAL_SIZE;
|
||||
mChildrens = (nsIWidget**)new DWORD[mArraySize];
|
||||
memset(mChildrens, 0, sizeof(DWORD) * mArraySize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче