Changed Init() to addref mAppShell and mPrefs, because that's what the other

overloaded Init() does and because the destructor will do a release


git-svn-id: svn://10.0.0.236/trunk@14865 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com 1998-11-18 05:31:03 +00:00
parent f1462f4d55
commit 8c7ca57e9f
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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