nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
nsMsgDisplayMessageByString(nsIPrompt * aPrompt, const PRUnichar * msg, const PRUnichar * windowTitle){  nsresult rv;  nsCOMPtr<nsIPrompt> prompt = aPrompt;  if ((!msg) || (!*msg))    return NS_ERROR_INVALID_ARG;    if (!prompt)  {    nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));    if (wwatch)      wwatch->GetNewPrompter(0, getter_AddRefs(prompt));  }    if (prompt)    rv = prompt->Alert(windowTitle, msg);  return NS_OK;}