зеркало из https://github.com/mozilla/pjs.git
Changed Init() to addref mAppShell and mPrefs, because that's what the other
overloaded Init() does and because the destructor will do a release
This commit is contained in:
Родитель
7716dc91e8
Коммит
d3648bb299
|
@ -936,13 +936,11 @@ nsBrowserWindow::Init(nsIAppShell* aAppShell,
|
|||
PRBool aAllowPlugins)
|
||||
{
|
||||
mChromeMask = aChromeMask;
|
||||
mAllowPlugins = aAllowPlugins;
|
||||
|
||||
mAppShell = aAppShell;
|
||||
NS_IF_ADDREF(mAppShell);
|
||||
|
||||
mPrefs = aPrefs;
|
||||
NS_IF_ADDREF(mPrefs);
|
||||
mAllowPlugins = aAllowPlugins;
|
||||
|
||||
// Create top level window
|
||||
nsresult rv = nsRepository::CreateInstance(kWindowCID, nsnull, kIWindowIID,
|
||||
|
@ -1015,7 +1013,9 @@ nsBrowserWindow::Init(nsIAppShell* aAppShell,
|
|||
{
|
||||
mChromeMask = aChromeMask;
|
||||
mAppShell = aAppShell;
|
||||
NS_IF_ADDREF(mAppShell);
|
||||
mPrefs = aPrefs;
|
||||
NS_IF_ADDREF(mPrefs);
|
||||
mAllowPlugins = aAllowPlugins;
|
||||
|
||||
// Create top level window
|
||||
|
|
|
@ -205,8 +205,8 @@ public:
|
|||
nsILabel * mLabel;
|
||||
|
||||
//for creating more instances
|
||||
nsIAppShell* mAppShell; //not addref'ed!
|
||||
nsIPref* mPrefs; //not addref'ed!
|
||||
nsIAppShell* mAppShell;
|
||||
nsIPref* mPrefs;
|
||||
PRBool mAllowPlugins;
|
||||
|
||||
// Global window collection
|
||||
|
|
Загрузка…
Ссылка в новой задаче