nsWindowEnumerator::GetNext(nsISupports **retval)
nsWatcherWindowEnumerator::GetNext(nsISupports **retval)
nsWindowEnumerator::GetNext(nsISupports **retval){  if (!retval)    return NS_ERROR_INVALID_ARG;  *retval = NULL;#ifdef USEWEAKREFS  while (mCurrentPosition) {    CallQueryReferent(mCurrentPosition->mWindow, retval);    if (*retval) {      mCurrentPosition = FindNext();      break;    } else // window is gone!      mWindowWatcher->RemoveWindow(mCurrentPosition);  }  NS_IF_ADDREF(*retval);#else  if (mCurrentPosition) {    CallQueryInterface(mCurrentPosition->mWindow, retval);    mCurrentPosition = FindNext();  }#endif  return NS_OK;}