diff --git a/profile/pref-migrator/src/nsPMProgressDlg.cpp b/profile/pref-migrator/src/nsPMProgressDlg.cpp index 19b9bcdb6475..fc3cbadbf3e4 100644 --- a/profile/pref-migrator/src/nsPMProgressDlg.cpp +++ b/profile/pref-migrator/src/nsPMProgressDlg.cpp @@ -169,12 +169,11 @@ nsPrefMigrationProgressDialog::CreateProfileProgressDialog() if ( NS_SUCCEEDED(rv) ) { - nsIWebShellWindow *newWindow; - + nsCOMPtr newWindow; rv = appShell->CreateTopLevelWindow( nsnull, url, PR_TRUE, - newWindow, + *getter_AddRefs(newWindow), nsnull, this, // callbacks?? 0, @@ -182,9 +181,7 @@ nsPrefMigrationProgressDialog::CreateProfileProgressDialog() if ( NS_SUCCEEDED( rv ) ) { - mWindow = newWindow; - NS_RELEASE( newWindow ); - + mWindow = newWindow; // ownership???? if (mWindow != nsnull) mWindow->Show(PR_TRUE); } diff --git a/profile/pref-migrator/src/nsPMProgressDlg.h b/profile/pref-migrator/src/nsPMProgressDlg.h index 008845b46024..2f1b17784cbd 100644 --- a/profile/pref-migrator/src/nsPMProgressDlg.h +++ b/profile/pref-migrator/src/nsPMProgressDlg.h @@ -61,7 +61,7 @@ class nsPrefMigrationProgressDialog : public nsIPrefMigrationProgress, public ns private: - nsCOMPtr mDocument; - nsCOMPtr mWindow; + nsCOMPtr mDocument; // is this really owned? + nsCOMPtr mWindow; // is this really owned? }; #endif \ No newline at end of file