mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 795939 - Cancel FX_PAGE_LOAD_MS when the request is aborted; r=felipe
This commit is contained in:
parent
e68d5f3063
commit
efbe81a3b8
@ -4733,12 +4733,16 @@ var TabsProgressListener = {
|
||||
#endif
|
||||
|
||||
// Collect telemetry data about tab load times.
|
||||
if (aWebProgress.DOMWindow == aWebProgress.DOMWindow.top &&
|
||||
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
|
||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_START)
|
||||
TelemetryStopwatch.start("FX_PAGE_LOAD_MS", aBrowser);
|
||||
else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
|
||||
TelemetryStopwatch.finish("FX_PAGE_LOAD_MS", aBrowser);
|
||||
if (aWebProgress.DOMWindow == aWebProgress.DOMWindow.top) {
|
||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
|
||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_START)
|
||||
TelemetryStopwatch.start("FX_PAGE_LOAD_MS", aBrowser);
|
||||
else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
|
||||
TelemetryStopwatch.finish("FX_PAGE_LOAD_MS", aBrowser);
|
||||
} else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
|
||||
aStatus == Cr.NS_BINDING_ABORTED) {
|
||||
TelemetryStopwatch.cancel("FX_PAGE_LOAD_MS", aBrowser);
|
||||
}
|
||||
}
|
||||
|
||||
// Attach a listener to watch for "click" events bubbling up from error
|
||||
|
Loading…
Reference in New Issue
Block a user