mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 22:08:40 +09:00
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:
parent
38e95f9e35
commit
54f2e6eafd
32 changed files with 263 additions and 13 deletions
|
|
@ -162,6 +162,30 @@ void
|
|||
NullHttpTransaction::OnTransportStatus(nsITransport* transport,
|
||||
nsresult status, int64_t progress)
|
||||
{
|
||||
if (status == NS_NET_STATUS_RESOLVING_HOST) {
|
||||
if (mTimings.domainLookupStart.IsNull()) {
|
||||
mTimings.domainLookupStart = TimeStamp::Now();
|
||||
}
|
||||
} else if (status == NS_NET_STATUS_RESOLVED_HOST) {
|
||||
if (mTimings.domainLookupEnd.IsNull()) {
|
||||
mTimings.domainLookupEnd = TimeStamp::Now();
|
||||
}
|
||||
} else if (status == NS_NET_STATUS_CONNECTING_TO) {
|
||||
if (mTimings.connectStart.IsNull()) {
|
||||
mTimings.connectStart = TimeStamp::Now();
|
||||
}
|
||||
} else if (status == NS_NET_STATUS_CONNECTED_TO) {
|
||||
if (mTimings.connectEnd.IsNull()) {
|
||||
mTimings.connectEnd = TimeStamp::Now();
|
||||
}
|
||||
} else if (status == NS_NET_STATUS_TLS_HANDSHAKE_ENDED) {
|
||||
if (mTimings.secureConnectionStart.IsNull() &&
|
||||
!mTimings.connectEnd.IsNull()) {
|
||||
mTimings.secureConnectionStart = mTimings.connectEnd;
|
||||
}
|
||||
mTimings.connectEnd = TimeStamp::Now();;
|
||||
}
|
||||
|
||||
if (mActivityDistributor) {
|
||||
NS_DispatchToMainThread(new CallObserveActivity(mActivityDistributor,
|
||||
mConnectionInfo->GetOrigin(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue