mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +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
|
|
@ -732,7 +732,9 @@ NetworkMonitor.prototype = {
|
|||
0x804b0004: "STATUS_CONNECTED_TO",
|
||||
0x804b0005: "STATUS_SENDING_TO",
|
||||
0x804b000a: "STATUS_WAITING_FOR",
|
||||
0x804b0006: "STATUS_RECEIVING_FROM"
|
||||
0x804b0006: "STATUS_RECEIVING_FROM",
|
||||
0x804b000c: "STATUS_TLS_STARTING",
|
||||
0x804b000d: "STATUS_TLS_ENDING"
|
||||
},
|
||||
|
||||
httpDownloadActivities: [
|
||||
|
|
@ -1406,6 +1408,7 @@ NetworkMonitor.prototype = {
|
|||
timings: {
|
||||
blocked: 0,
|
||||
dns: 0,
|
||||
ssl: 0,
|
||||
connect: 0,
|
||||
send: 0,
|
||||
wait: 0,
|
||||
|
|
@ -1440,6 +1443,36 @@ NetworkMonitor.prototype = {
|
|||
harTimings.connect = -1;
|
||||
}
|
||||
|
||||
if (timings.STATUS_TLS_STARTING && timings.STATUS_TLS_ENDING) {
|
||||
harTimings.ssl = timings.STATUS_TLS_ENDING.last -
|
||||
timings.STATUS_TLS_STARTING.first;
|
||||
} else {
|
||||
harTimings.ssl = -1;
|
||||
}
|
||||
|
||||
// sometimes the connection information events are attached to a speculative
|
||||
// channel instead of this one, but necko might glue them back together in the
|
||||
// nsITimedChannel interface used by Resource and Navigation Timing
|
||||
let timedChannel = httpActivity.channel.QueryInterface(Ci.nsITimedChannel);
|
||||
|
||||
if ((harTimings.connect <= 0) && timedChannel) {
|
||||
if (timedChannel.secureConnectionStartTime > timedChannel.connectStartTime) {
|
||||
harTimings.connect =
|
||||
timedChannel.secureConnectionStartTime - timedChannel.connectStartTime;
|
||||
harTimings.ssl =
|
||||
timedChannel.connectEndTime - timedChannel.secureConnectionStartTime;
|
||||
} else {
|
||||
harTimings.connect =
|
||||
timedChannel.connectEndTime - timedChannel.connectStartTime;
|
||||
harTimings.ssl = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((harTimings.dns <= 0) && timedChannel) {
|
||||
harTimings.dns =
|
||||
timedChannel.domainLookupEndTime - timedChannel.domainLookupStartTime;
|
||||
}
|
||||
|
||||
if (timings.STATUS_SENDING_TO) {
|
||||
harTimings.send = timings.STATUS_SENDING_TO.last - timings.STATUS_SENDING_TO.first;
|
||||
} else if (timings.REQUEST_HEADER && timings.REQUEST_BODY_SENT) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue