зеркало из https://github.com/mozilla/gecko-dev.git
Don't pass "this" to a member class if the member class is going to Addref, and we haven't called NS_INIT_REFCNT first.
This commit is contained in:
Родитель
70f1ea2b11
Коммит
ce8d8da727
|
@ -16,13 +16,12 @@
|
|||
* Reserved.
|
||||
*/
|
||||
|
||||
#include <LowMem.h>
|
||||
|
||||
#include "nsWindow.h"
|
||||
#include "nsMacWindow.h"
|
||||
#include "nsMacEventHandler.h"
|
||||
#include "nsMacMessageSink.h"
|
||||
|
||||
#include <LowMem.h>
|
||||
|
||||
// from MacHeaders.c
|
||||
#ifndef topLeft
|
||||
#define topLeft(r) (((Point *) &(r))[0])
|
||||
|
@ -56,9 +55,10 @@ NS_IMPL_RELEASE(nsMacWindow);
|
|||
nsMacWindow::nsMacWindow() : nsWindow()
|
||||
, mWindowMadeHere(PR_FALSE)
|
||||
, mIsDialog(PR_FALSE)
|
||||
, mMacEventHandler(new nsMacEventHandler(this))
|
||||
, mMacEventHandler(nsnull)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mMacEventHandler.reset(new nsMacEventHandler(this));
|
||||
strcpy(gInstanceClassName, "nsMacWindow");
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче