diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 11:52:50 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 11:52:50 +0100 |
commit | 644e9db1092df1477b1facc52cd3ee45ebd13040 (patch) | |
tree | b126bae065184d0d39abee3fb9ba83a6c4ab7508 /netwerk/protocol/http/nsHttpTransaction.cpp | |
parent | 228d252ab14f65f8433c8d53122a7d1e9429c23e (diff) | |
download | UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.tar UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.tar.gz UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.tar.lz UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.tar.xz UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.zip |
DevTools - network - implement the secureConnectionStart property for the PerformanceTiming
https://github.com/MoonchildProductions/moebius/pull/116
("/testing" and "/toolkit" in in the previous commit)
Diffstat (limited to 'netwerk/protocol/http/nsHttpTransaction.cpp')
-rw-r--r-- | netwerk/protocol/http/nsHttpTransaction.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp index bc182c6cd..706710d89 100644 --- a/netwerk/protocol/http/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/nsHttpTransaction.cpp @@ -623,6 +623,14 @@ nsHttpTransaction::OnTransportStatus(nsITransport* transport, } else if (status == NS_NET_STATUS_CONNECTED_TO) { SetConnectEnd(TimeStamp::Now(), true); } else if (status == NS_NET_STATUS_TLS_HANDSHAKE_ENDED) { + { + // before overwriting connectEnd, copy it to secureConnectionStart + MutexAutoLock lock(mLock); + if (mTimings.secureConnectionStart.IsNull() && + !mTimings.connectEnd.IsNull()) { + mTimings.secureConnectionStart = mTimings.connectEnd; + } + } SetConnectEnd(TimeStamp::Now(), false); } } @@ -2136,6 +2144,13 @@ nsHttpTransaction::Timings() } void +nsHttpTransaction::BootstrapTimings(TimingStruct times) +{ + mozilla::MutexAutoLock lock(mLock); + mTimings = times; +} + +void nsHttpTransaction::SetDomainLookupStart(mozilla::TimeStamp timeStamp, bool onlyIfNull) { mozilla::MutexAutoLock lock(mLock); @@ -2227,6 +2242,13 @@ nsHttpTransaction::GetConnectStart() } mozilla::TimeStamp +nsHttpTransaction::GetSecureConnectionStart() +{ + mozilla::MutexAutoLock lock(mLock); + return mTimings.secureConnectionStart; +} + +mozilla::TimeStamp nsHttpTransaction::GetConnectEnd() { mozilla::MutexAutoLock lock(mLock); |