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; }
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);}