summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/nsHttpConnection.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 11:52:50 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 11:52:50 +0100
commit644e9db1092df1477b1facc52cd3ee45ebd13040 (patch)
treeb126bae065184d0d39abee3fb9ba83a6c4ab7508 /netwerk/protocol/http/nsHttpConnection.cpp
parent228d252ab14f65f8433c8d53122a7d1e9429c23e (diff)
downloadUXP-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/nsHttpConnection.cpp')
-rw-r--r--netwerk/protocol/http/nsHttpConnection.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp
index 95a06fd5c..c4564cd8b 100644
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -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