Fix topcrash by adding safety null checks and correcting a typo
This commit is contained in:
kaie%netscape.com 2001-08-28 04:40:36 +00:00
Родитель d2beab414f
Коммит f8e4e2d9fe
3 изменённых файлов: 13 добавлений и 9 удалений

Просмотреть файл

@ -27,7 +27,7 @@ MixedContentMessage=You have requested an encrypted page that contains some unen
LeaveSecureMessage=You are about to leave an encrypted page. Information you send or receive from now on could easily be read by a third party.
EnterSecureMessage=You have requested an encrypted page. The web site has identified itself correctly, and information you see or enter on this page can't easily be read by a third party.
WeakSecureMessage=You have requested a page that uses low-grade encryption. The web site has identified itself correctly, but information you see or enter on this page could be read by a third party.
PostToInsecurefromSecureMessage=Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.##Are you sure you want to continue sending this information?##
PostToInsecureFromSecureMessage=Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.##Are you sure you want to continue sending this information?##
PostToInsecureFromInsecureMessage=The information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.##Are you sure you want to continue sending this information?##
MixedContentShowAgain=Alert me whenever I'm about to view an encrypted page that contains some unencrypted information.
LeaveSecureShowAgain=Alert me whenever I leave an encrypted page for one that isn't encrypted.

Просмотреть файл

@ -572,11 +572,13 @@ nsNSSDialogs::ConfirmDialog(nsIInterfaceRequestor *ctx, const char *prefName,
// Get user's preference for this alert
// prefName, showAgainName are null if there is no preference for this dialog
PRBool prefValue;
PRBool prefValue = PR_TRUE;
if (prefName != nsnull) {
rv = mPref->GetBoolPref(prefName, &prefValue);
if (NS_FAILED(rv)) prefValue = PR_TRUE;
}
rv = mPref->GetBoolPref(prefName, &prefValue);
if (NS_FAILED(rv)) prefValue = PR_TRUE;
// Stop if confirm is not requested
if (!prefValue) {
*_result = PR_TRUE;
@ -594,8 +596,10 @@ nsNSSDialogs::ConfirmDialog(nsIInterfaceRequestor *ctx, const char *prefName,
getter_Copies(windowTitle));
mStringBundle->GetStringFromName(messageName,
getter_Copies(message));
mStringBundle->GetStringFromName(showAgainName,
getter_Copies(alertMe));
if (showAgainName != nsnull) {
mStringBundle->GetStringFromName(showAgainName,
getter_Copies(alertMe));
}
mStringBundle->GetStringFromName(NS_LITERAL_STRING("Continue").get(),
getter_Copies(cont));
// alertMe is allowed to be null
@ -630,7 +634,7 @@ nsNSSDialogs::ConfirmDialog(nsIInterfaceRequestor *ctx, const char *prefName,
*_result = PR_FALSE;
}
if (!prefValue) {
if (!prefValue && prefName != nsnull) {
mPref->SetBoolPref(prefName, PR_FALSE);
}

Просмотреть файл

@ -27,7 +27,7 @@ MixedContentMessage=You have requested an encrypted page that contains some unen
LeaveSecureMessage=You are about to leave an encrypted page. Information you send or receive from now on could easily be read by a third party.
EnterSecureMessage=You have requested an encrypted page. The web site has identified itself correctly, and information you see or enter on this page can't easily be read by a third party.
WeakSecureMessage=You have requested a page that uses low-grade encryption. The web site has identified itself correctly, but information you see or enter on this page could be read by a third party.
PostToInsecurefromSecureMessage=Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.##Are you sure you want to continue sending this information?##
PostToInsecureFromSecureMessage=Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.##Are you sure you want to continue sending this information?##
PostToInsecureFromInsecureMessage=The information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.##Are you sure you want to continue sending this information?##
MixedContentShowAgain=Alert me whenever I'm about to view an encrypted page that contains some unencrypted information.
LeaveSecureShowAgain=Alert me whenever I leave an encrypted page for one that isn't encrypted.