nsresult rv;
NS_IMETHODIMP nsSDRContext::GetInterface(const nsIID & uuid, void * *result){  nsresult rv;  if (uuid.Equals(NS_GET_IID(nsIPrompt))) {    nsCOMPtr<nsIProxyObjectManager> proxyman(do_GetService(NS_XPCOMPROXY_CONTRACTID));    if (!proxyman) return NS_ERROR_FAILURE;    nsCOMPtr<nsIPrompt> prompter;    nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));    if (wwatch) {      wwatch->GetNewPrompter(0, getter_AddRefs(prompter));      if (prompter) {        nsCOMPtr<nsIPrompt> proxyPrompt;        proxyman->GetProxyForObject(NS_UI_THREAD_EVENTQ, NS_GET_IID(nsIPrompt),                                    prompter, PROXY_SYNC, getter_AddRefs(proxyPrompt));        if (!proxyPrompt) return NS_ERROR_FAILURE;        *result = proxyPrompt;        NS_ADDREF((nsIPrompt*)*result);      }    }  } else {    rv = NS_ERROR_NO_INTERFACE;  }  return rv;}