aWindow->GetClientData(data); if (data == nsnull) rv = NS_ERROR_NULL_POINTER; else { nsWebShellWindow* window = (nsWebShellWindow *) data; nsIWebShellContainer* wsc; rv = window->QueryInterface(kIWebShellContainerIID, (void **) &wsc); if (NS_SUCCEEDED(rv)) { mWindowList->AppendElement(wsc); NS_RELEASE(wsc); } } return rv;
if(mWindowMediator) mWindowMediator->RegisterWindow(aWindow);  return NS_OK;
nsAppShellService::RegisterTopLevelWindow(nsIWidget* aWindow){  nsresult rv;  void* data;  aWindow->GetClientData(data);  if (data == nsnull)    rv = NS_ERROR_NULL_POINTER;  else {    nsWebShellWindow* window = (nsWebShellWindow *) data;    nsIWebShellContainer* wsc;    rv = window->QueryInterface(kIWebShellContainerIID, (void **) &wsc);    if (NS_SUCCEEDED(rv)) {      mWindowList->AppendElement(wsc);      NS_RELEASE(wsc);    }  }  return rv;}