NS_IMETHODIMP nsWindowMediator::UnregisterWindow( nsIWebShellWindow* inWindow )
nsWindowMediator::UnregisterWindow(nsIXULWindow* inWindow)
NS_IMETHODIMP nsWindowMediator::UnregisterWindow( nsIWebShellWindow* inWindow ){	// Find Window info	PRInt32 count = mWindowList.Count();	nsWindowInfo* windowInfo = NULL;	PRInt32 windowIndex = 0;	for ( windowIndex = 0; windowIndex< count; windowIndex++ )	{		windowInfo = (nsWindowInfo*) mWindowList[windowIndex];		if ( ( windowInfo )->mWindow.get() == inWindow )			break;		windowInfo = NULL;	}		if ( windowInfo == NULL )			return NS_ERROR_INVALID_ARG;		  // Inform the iterators  PRInt32 index = -1;  while (++index < mEnumeratorList.Count() )   {  	((nsWindowEnumerator*)mEnumeratorList[ index ] )->WindowRemoved ( windowIndex );  }   	// Remove From RDF  nsCOMPtr<nsIRDFContainer> container;  nsresult rv = NS_NewRDFContainer(mInner, kNC_WindowMediatorRoot, getter_AddRefs(container));  if (NS_SUCCEEDED(rv))  {  	container->RemoveElement( windowInfo->mRDFID, PR_TRUE );  } 		// Remove from the list and free up 	mWindowList.RemoveElement( windowInfo );		delete windowInfo;		return NS_OK;}