NS_WITH_PROXIED_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID, NS_UI_THREAD_EVENTQ, &rv); if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIProxyObjectManager> proxyman(do_GetService(NS_XPCOMPROXY_CONTRACTID)); if (!proxyman) return NS_ERROR_FAILURE;
NS_IMETHODIMP CertDownloaderContext::GetInterface(const nsIID & uuid, void * *result){  nsresult rv;  if (uuid.Equals(NS_GET_IID(nsIPrompt))) {    NS_WITH_PROXIED_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID,                          NS_UI_THREAD_EVENTQ, &rv);    if (NS_FAILED(rv)) return rv;    *result = dialog;    NS_ADDREF(dialog);  } else {    rv = NS_ERROR_NO_INTERFACE;  }  return rv;}