Comments to make the ownership model clearer
git-svn-id: svn://10.0.0.236/trunk@35917 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -472,8 +472,12 @@ nsAppShellService::CreateTopLevelWindow(nsIWebShellWindow *aParent,
|
||||
rv = window->Initialize((nsIWebShellWindow *) nsnull, mAppShell, aUrl,
|
||||
anObserver, aCallbacks,
|
||||
aInitialWidth, aInitialHeight);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
// this does the AddRef of the return value
|
||||
rv = window->QueryInterface(kIWebShellWindowIID, (void **) &aResult);
|
||||
|
||||
// the addref resulting from this is the owning addref for this window
|
||||
RegisterTopLevelWindow(window);
|
||||
if (showWindow)
|
||||
window->Show(PR_TRUE);
|
||||
|
||||
Reference in New Issue
Block a user