Backed out changeset 87356283d9f2 (bug 443811) for mac xpcshell permacrashes CLOSED TREE

This commit is contained in:
Wes Kocher 2015-08-12 14:27:55 -07:00
parent 67bb296493
commit f13fc91d53
3 changed files with 19 additions and 24 deletions

View File

@ -838,10 +838,12 @@ GetDateBoundary(nsIX509Cert* ix509,
if (NS_FAILED(rv))
return;
dateTimeFormat->FormatPRTime(nullptr, kDateFormatLong, kTimeFormatNoSeconds,
timeToUse, formattedDate);
dateTimeFormat->FormatPRTime(nullptr, kDateFormatLong, kTimeFormatNoSeconds,
now, nowDate);
dateTimeFormat->FormatPRTime(nullptr, kDateFormatShort,
kTimeFormatNoSeconds, timeToUse,
formattedDate);
dateTimeFormat->FormatPRTime(nullptr, kDateFormatShort,
kTimeFormatNoSeconds, now,
nowDate);
}
static void

View File

@ -1658,15 +1658,14 @@ ProcessSECAlgorithmID(SECAlgorithmID *algID,
}
static nsresult
ProcessTime(PRTime dispTime, const char16_t* displayName,
nsIASN1Sequence* parentSequence)
ProcessTime(PRTime dispTime, const char16_t *displayName,
nsIASN1Sequence *parentSequence)
{
nsresult rv;
nsCOMPtr<nsIDateTimeFormat> dateFormatter =
do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
if (NS_FAILED(rv)) {
if (NS_FAILED(rv))
return rv;
}
nsString text;
nsString tempString;
@ -1674,9 +1673,8 @@ ProcessTime(PRTime dispTime, const char16_t* displayName,
PRExplodedTime explodedTime;
PR_ExplodeTime(dispTime, PR_LocalTimeParameters, &explodedTime);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatLong,
kTimeFormatSecondsForce24Hour,
&explodedTime, tempString);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatShort, kTimeFormatSecondsForce24Hour,
&explodedTime, tempString);
text.Append(tempString);
text.AppendLiteral("\n(");
@ -1684,9 +1682,8 @@ ProcessTime(PRTime dispTime, const char16_t* displayName,
PRExplodedTime explodedTimeGMT;
PR_ExplodeTime(dispTime, PR_GMTParameters, &explodedTimeGMT);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatLong,
kTimeFormatSecondsForce24Hour,
&explodedTimeGMT, tempString);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatShort, kTimeFormatSecondsForce24Hour,
&explodedTimeGMT, tempString);
text.Append(tempString);
text.AppendLiteral(" GMT)");

View File

@ -60,8 +60,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotBeforeLocalTime(nsAString &aNotBeforeLoc
nsAutoString date;
PRExplodedTime explodedTime;
PR_ExplodeTime(mNotBefore, PR_LocalTimeParameters, &explodedTime);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatLong,
kTimeFormatSecondsForce24Hour,
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatShort, kTimeFormatSecondsForce24Hour,
&explodedTime, date);
aNotBeforeLocalTime = date;
return NS_OK;
@ -80,7 +79,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotBeforeLocalDay(nsAString &aNotBeforeLoca
nsAutoString date;
PRExplodedTime explodedTime;
PR_ExplodeTime(mNotBefore, PR_LocalTimeParameters, &explodedTime);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatLong, kTimeFormatNone,
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatShort, kTimeFormatNone,
&explodedTime, date);
aNotBeforeLocalDay = date;
return NS_OK;
@ -100,8 +99,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotBeforeGMT(nsAString &aNotBeforeGMT)
nsAutoString date;
PRExplodedTime explodedTime;
PR_ExplodeTime(mNotBefore, PR_GMTParameters, &explodedTime);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatLong,
kTimeFormatSecondsForce24Hour,
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatShort, kTimeFormatSecondsForce24Hour,
&explodedTime, date);
aNotBeforeGMT = date;
return NS_OK;
@ -132,8 +130,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotAfterLocalTime(nsAString &aNotAfterLocal
nsAutoString date;
PRExplodedTime explodedTime;
PR_ExplodeTime(mNotAfter, PR_LocalTimeParameters, &explodedTime);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatLong,
kTimeFormatSecondsForce24Hour,
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatShort, kTimeFormatSecondsForce24Hour,
&explodedTime, date);
aNotAfterLocaltime = date;
return NS_OK;
@ -152,7 +149,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotAfterLocalDay(nsAString &aNotAfterLocalD
nsAutoString date;
PRExplodedTime explodedTime;
PR_ExplodeTime(mNotAfter, PR_LocalTimeParameters, &explodedTime);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatLong, kTimeFormatNone,
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatShort, kTimeFormatNone,
&explodedTime, date);
aNotAfterLocalDay = date;
return NS_OK;
@ -171,8 +168,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotAfterGMT(nsAString &aNotAfterGMT)
nsAutoString date;
PRExplodedTime explodedTime;
PR_ExplodeTime(mNotAfter, PR_GMTParameters, &explodedTime);
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatLong,
kTimeFormatSecondsForce24Hour,
dateFormatter->FormatPRExplodedTime(nullptr, kDateFormatShort, kTimeFormatSecondsForce24Hour,
&explodedTime, date);
aNotAfterGMT = date;
return NS_OK;