Bug 920909 - Fix lossy startTime fields serialization. r=ehsan

This commit is contained in:
Benoit Girard 2013-09-27 11:51:25 -04:00
Родитель c84ee4400e
Коммит 84c9211fca
2 изменённых файлов: 11 добавлений и 1 удалений

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

@ -154,6 +154,16 @@ struct SendToStreamImpl<char *>
}
};
template <>
struct SendToStreamImpl<double>
{
static void run(std::ostream& stream, double p) {
// 13 for ms, 16 of microseconds, plus an extra 2
stream.precision(18);
stream << p;
}
};
template <>
struct SendToStreamImpl<JSCustomObject*>
{

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

@ -117,7 +117,7 @@ typename Builder::Object TableTicker::GetMetaJSCustomObject(Builder& b)
b.DefineProperty(meta, "processType", XRE_GetProcessType());
TimeDuration delta = TimeStamp::Now() - sStartTime;
b.DefineProperty(meta, "startTime", PR_Now()/1000.0f - delta.ToMilliseconds());
b.DefineProperty(meta, "startTime", PR_Now()/1000.0 - delta.ToMilliseconds());
nsresult res;
nsCOMPtr<nsIHttpProtocolHandler> http = do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &res);