DevTools - network - implement the secureConnectionStart property for the PerformanceTiming

https://github.com/MoonchildProductions/moebius/pull/116
("/testing" and "/toolkit" in in the previous commit)
This commit is contained in:
janekptacijarabaci
2018-03-01 11:52:50 +01:00
committed by Roy Tam
parent 38e95f9e35
commit 54f2e6eafd
32 changed files with 263 additions and 13 deletions
+22 -3
View File
@@ -527,8 +527,15 @@ npnComplete:
mNPNComplete = true;
mTransaction->OnTransportStatus(mSocketTransport,
NS_NET_STATUS_TLS_HANDSHAKE_ENDED,
0);
NS_NET_STATUS_TLS_HANDSHAKE_ENDED, 0);
// this is happening after the bootstrap was originally written to. so update it.
if (mBootstrappedTimings.secureConnectionStart.IsNull() &&
!mBootstrappedTimings.connectEnd.IsNull()) {
mBootstrappedTimings.secureConnectionStart = mBootstrappedTimings.connectEnd;
mBootstrappedTimings.connectEnd = TimeStamp::Now();
}
if (mWaitingFor0RTTResponse) {
// Didn't get 0RTT OK, back out of the "attempting 0RTT" state
mWaitingFor0RTTResponse = false;
@@ -572,8 +579,14 @@ nsHttpConnection::Activate(nsAHttpTransaction *trans, uint32_t caps, int32_t pri
LOG(("nsHttpConnection::Activate [this=%p trans=%p caps=%x]\n",
this, trans, caps));
if (!trans->IsNullTransaction())
if (!mExperienced && !trans->IsNullTransaction()) {
mExperienced = true;
nsHttpTransaction *hTrans = trans->QueryHttpTransaction();
if (hTrans) {
hTrans->BootstrapTimings(mBootstrappedTimings);
}
mBootstrappedTimings = TimingStruct();
}
mTransactionCaps = caps;
mPriority = pri;
@@ -2414,5 +2427,11 @@ nsHttpConnection::CheckForTraffic(bool check)
}
}
void
nsHttpConnection::BootstrapTimings(TimingStruct times)
{
mBootstrappedTimings = times;
}
} // namespace net
} // namespace mozilla