nsresult rv = m_args->m_principals->GetJSPrincipals(cx, &principals);
nsString final; nsString temp; nsresult rv;  nsCOMPtr<nsINSSComponent> nssComponent(do_GetService(kNSSComponentCID, &rv)); if (NS_FAILED(rv)) return rv;    nssComponent->GetPIPNSSBundleString("ForcedBackup1", final); final.Append(NS_LITERAL_STRING("\n\n").get()); nssComponent->GetPIPNSSBundleString("ForcedBackup2", temp); final.Append(temp.get()); final.Append(NS_LITERAL_STRING("\n\n").get());  nssComponent->GetPIPNSSBundleString("ForcedBackup3", temp);  final.Append(temp.get()); alertUser(final.get());  nsCOMPtr<nsIFilePicker> filePicker = do_CreateInstance("@mozilla.org/filepicker;1", &rv); if (!filePicker) { NS_ASSERTION(0, "Could not create a file picker when backing up certs."); return rv; }  nsCOMPtr<nsIWindowWatcher> wwatch = (do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv);  nsCOMPtr<nsIDOMWindow> window; wwatch->GetActiveWindow(getter_AddRefs(window));  nsString filePickMessage; nssComponent->GetPIPNSSBundleString("chooseP12BackupFileDialog", filePickMessage); rv = filePicker->Init(window, filePickMessage, nsIFilePicker::modeSave); NS_ENSURE_SUCCESS(rv, rv);  filePicker->AppendFilter(NS_LITERAL_STRING("PKCS12"), NS_LITERAL_STRING("*.p12")); filePicker->AppendFilters(nsIFilePicker::filterAll);  PRInt16 dialogReturn; filePicker->Show(&dialogReturn); if (dialogReturn == nsIFilePicker::returnCancel) return NS_OK;   nsCOMPtr<nsILocalFile> localFile; rv = filePicker->GetFile(getter_AddRefs(localFile));
nsCryptoRunnable::Run(){  nsNSSShutDownPreventionLock locker;  JSPrincipals *principals;  JSContext *cx = m_args->m_cx;  nsresult rv = m_args->m_principals->GetJSPrincipals(cx, &principals);  if (NS_FAILED(rv))    return NS_ERROR_FAILURE;  jsval retval;  if (JS_EvaluateScriptForPrincipals(cx, m_args->m_scope, principals,                                     m_args->m_jsCallback,                                      strlen(m_args->m_jsCallback),                                     nsnull, 0,                                     &retval) != JS_TRUE) {    return NS_ERROR_FAILURE;  }  return NS_OK;}