mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-08 04:16:16 +00:00
Comments to make the ownership model clearer
This commit is contained in:
parent
fe9b59d164
commit
81eb5e97f2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user