rv = uri->GetHost(&strippedRealm); if (NS_FAILED(rv)) { return; }
nsCOMPtr<nsIIOService> ioService = do_GetService(NS_IOSERVICE_CONTRACTID); if (!ioService) return; ioService->ExtractUrlPart(passwordRealm, nsIIOService::url_Host, 0, 0, &strippedRealm);
SINGSIGN_RememberSignonData     (nsIPrompt* dialog, const char* passwordRealm, nsVoidArray * signonData,     nsIDOMWindowInternal* window){  nsresult rv;  NS_WITH_SERVICE(nsIURL, uri, "@mozilla.org/network/standard-url;1", &rv);  if (NS_FAILED(rv)) {    return;  }  rv = uri->SetSpec(passwordRealm);  if (NS_FAILED(rv)) {    return;  }  char * strippedRealm;  rv = uri->GetHost(&strippedRealm);  if (NS_FAILED(rv)) {    return;  }  si_RememberSignonData(dialog, strippedRealm, signonData, window);  PR_Free(strippedRealm);}