Bug 673381, patch v3 for NSPR/NSS versions in about:support, make build time minimum NSPR/NSS versions available to JS, r=rrelyea

This commit is contained in:
Kai Engert 2012-03-13 00:04:35 +01:00
Родитель 1fc1dc1879
Коммит c4e7e180f2
2 изменённых файлов: 44 добавлений и 1 удалений

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

@ -42,8 +42,16 @@
#define NS_NSSVERSION_CONTRACTID "@mozilla.org/security/nssversion;1"
%}
[scriptable, uuid(5f6c8e09-3311-4b24-b0d5-d6e75e7478a4)]
[scriptable, uuid(a8a53a2b-75cc-4c68-a9bb-9791dbddaa00)]
interface nsINSSVersion : nsISupports {
/* Minimal required versions as used at build time */
readonly attribute AString NSPR_MinVersion;
readonly attribute AString NSS_MinVersion;
readonly attribute AString NSSUTIL_MinVersion;
readonly attribute AString NSSSSL_MinVersion;
readonly attribute AString NSSSMIME_MinVersion;
/* Versions of libraries currently in use */
readonly attribute AString NSPR_Version;
readonly attribute AString NSS_Version;
readonly attribute AString NSSUTIL_Version;

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

@ -88,3 +88,38 @@ nsNSSVersion::GetNSSSMIME_Version(nsAString & v)
CopyUTF8toUTF16(NSSSMIME_GetVersion(), v);
return NS_OK;
}
NS_IMETHODIMP
nsNSSVersion::GetNSPR_MinVersion(nsAString & v)
{
CopyUTF8toUTF16(PR_VERSION, v);
return NS_OK;
}
NS_IMETHODIMP
nsNSSVersion::GetNSS_MinVersion(nsAString & v)
{
CopyUTF8toUTF16(NSS_VERSION, v);
return NS_OK;
}
NS_IMETHODIMP
nsNSSVersion::GetNSSUTIL_MinVersion(nsAString & v)
{
CopyUTF8toUTF16(NSSUTIL_VERSION, v);
return NS_OK;
}
NS_IMETHODIMP
nsNSSVersion::GetNSSSSL_MinVersion(nsAString & v)
{
CopyUTF8toUTF16(NSS_VERSION, v);
return NS_OK;
}
NS_IMETHODIMP
nsNSSVersion::GetNSSSMIME_MinVersion(nsAString & v)
{
CopyUTF8toUTF16(NSS_VERSION, v);
return NS_OK;
}