nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
nsMsgAskBooleanQuestionByString(nsIPrompt * aPrompt, const PRUnichar * msg, PRBool *answer, const PRUnichar * windowTitle){  nsresult rv;  PRInt32 result;  nsCOMPtr<nsIPrompt> dialog = aPrompt;  if ((!msg) || (!*msg))    return NS_ERROR_INVALID_ARG;    if (!dialog)  {    nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));    if (wwatch)      wwatch->GetNewPrompter(0, getter_AddRefs(dialog));  }  if (dialog)   {    rv = dialog->Confirm(windowTitle, msg, &result);    if (result == 1)       *answer = PR_TRUE;    else       *answer = PR_FALSE;  }  return NS_OK;}     