mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 920909 - Fix lossy startTime fields serialization. r=ehsan
This commit is contained in:
parent
c84ee4400e
commit
84c9211fca
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user