mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
Basilisk: Remove TelemetryStopwatch
This commit is contained in:
parent
8ad5a057d1
commit
4c5dd3bcf8
14 changed files with 8 additions and 212 deletions
|
|
@ -379,12 +379,10 @@ var FullScreen = {
|
||||||
let topWin = event.target.ownerGlobal.top;
|
let topWin = event.target.ownerGlobal.top;
|
||||||
browser = gBrowser.getBrowserForContentWindow(topWin);
|
browser = gBrowser.getBrowserForContentWindow(topWin);
|
||||||
}
|
}
|
||||||
TelemetryStopwatch.start("FULLSCREEN_CHANGE_MS");
|
|
||||||
this.enterDomFullscreen(browser);
|
this.enterDomFullscreen(browser);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "MozDOMFullscreen:Exited":
|
case "MozDOMFullscreen:Exited":
|
||||||
TelemetryStopwatch.start("FULLSCREEN_CHANGE_MS");
|
|
||||||
this.cleanupDomFullscreen();
|
this.cleanupDomFullscreen();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -410,7 +408,6 @@ var FullScreen = {
|
||||||
}
|
}
|
||||||
case "DOMFullscreen:Painted": {
|
case "DOMFullscreen:Painted": {
|
||||||
Services.obs.notifyObservers(window, "fullscreen-painted", "");
|
Services.obs.notifyObservers(window, "fullscreen-painted", "");
|
||||||
TelemetryStopwatch.finish("FULLSCREEN_CHANGE_MS");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1001,13 +1001,10 @@ var gHistorySwipeAnimation = {
|
||||||
ctx.DRAWWINDOW_ASYNC_DECODE_IMAGES |
|
ctx.DRAWWINDOW_ASYNC_DECODE_IMAGES |
|
||||||
ctx.DRAWWINDOW_USE_WIDGET_LAYERS);
|
ctx.DRAWWINDOW_USE_WIDGET_LAYERS);
|
||||||
|
|
||||||
TelemetryStopwatch.start("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
|
|
||||||
try {
|
try {
|
||||||
this._installCurrentPageSnapshot(canvas);
|
this._installCurrentPageSnapshot(canvas);
|
||||||
this._assignSnapshotToCurrentBrowser(canvas);
|
this._assignSnapshotToCurrentBrowser(canvas);
|
||||||
} finally {
|
} catch (e) {}
|
||||||
TelemetryStopwatch.finish("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1058,7 +1055,6 @@ var gHistorySwipeAnimation = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TelemetryStopwatch.start("FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE");
|
|
||||||
try {
|
try {
|
||||||
let browser = gBrowser.selectedBrowser;
|
let browser = gBrowser.selectedBrowser;
|
||||||
let snapshots = browser.snapshots;
|
let snapshots = browser.snapshots;
|
||||||
|
|
@ -1072,9 +1068,7 @@ var gHistorySwipeAnimation = {
|
||||||
}
|
}
|
||||||
}, "image/png"
|
}, "image/png"
|
||||||
);
|
);
|
||||||
} finally {
|
} catch (e) {}
|
||||||
TelemetryStopwatch.finish("FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
|
||||||
["SitePermissions", "resource:///modules/SitePermissions.jsm"],
|
["SitePermissions", "resource:///modules/SitePermissions.jsm"],
|
||||||
["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"],
|
["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"],
|
||||||
["Task", "resource://gre/modules/Task.jsm"],
|
["Task", "resource://gre/modules/Task.jsm"],
|
||||||
["TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm"],
|
|
||||||
["Translation", "resource:///modules/translation/Translation.jsm"],
|
["Translation", "resource:///modules/translation/Translation.jsm"],
|
||||||
["UpdateUtils", "resource://gre/modules/UpdateUtils.jsm"],
|
["UpdateUtils", "resource://gre/modules/UpdateUtils.jsm"],
|
||||||
["Weave", "resource://services-sync/main.js"],
|
["Weave", "resource://services-sync/main.js"],
|
||||||
|
|
@ -3825,8 +3824,6 @@ function toOpenWindowByType(inType, uri, features)
|
||||||
|
|
||||||
function OpenBrowserWindow(options)
|
function OpenBrowserWindow(options)
|
||||||
{
|
{
|
||||||
var telemetryObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_NEW_WINDOW_MS", telemetryObj);
|
|
||||||
|
|
||||||
function newDocumentShown(doc, topic, data) {
|
function newDocumentShown(doc, topic, data) {
|
||||||
if (topic == "document-shown" &&
|
if (topic == "document-shown" &&
|
||||||
|
|
@ -3834,7 +3831,6 @@ function OpenBrowserWindow(options)
|
||||||
doc.defaultView == win) {
|
doc.defaultView == win) {
|
||||||
Services.obs.removeObserver(newDocumentShown, "document-shown");
|
Services.obs.removeObserver(newDocumentShown, "document-shown");
|
||||||
Services.obs.removeObserver(windowClosed, "domwindowclosed");
|
Services.obs.removeObserver(windowClosed, "domwindowclosed");
|
||||||
TelemetryStopwatch.finish("FX_NEW_WINDOW_MS", telemetryObj);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4630,25 +4626,6 @@ var TabsProgressListener = {
|
||||||
_startedLoadTimer: new WeakSet(),
|
_startedLoadTimer: new WeakSet(),
|
||||||
|
|
||||||
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
|
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
|
||||||
// Collect telemetry data about tab load times.
|
|
||||||
if (aWebProgress.isTopLevel && (!aRequest.originalURI || aRequest.originalURI.spec.scheme != "about")) {
|
|
||||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
|
|
||||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
|
|
||||||
this._startedLoadTimer.add(aBrowser);
|
|
||||||
TelemetryStopwatch.start("FX_PAGE_LOAD_MS", aBrowser);
|
|
||||||
Services.telemetry.getHistogramById("FX_TOTAL_TOP_VISITS").add(true);
|
|
||||||
} else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
|
|
||||||
this._startedLoadTimer.has(aBrowser)) {
|
|
||||||
this._startedLoadTimer.delete(aBrowser);
|
|
||||||
TelemetryStopwatch.finish("FX_PAGE_LOAD_MS", aBrowser);
|
|
||||||
}
|
|
||||||
} else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
|
|
||||||
aStatus == Cr.NS_BINDING_ABORTED &&
|
|
||||||
this._startedLoadTimer.has(aBrowser)) {
|
|
||||||
this._startedLoadTimer.delete(aBrowser);
|
|
||||||
TelemetryStopwatch.cancel("FX_PAGE_LOAD_MS", aBrowser);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// We used to listen for clicks in the browser here, but when that
|
// We used to listen for clicks in the browser here, but when that
|
||||||
// became unnecessary, removing the code below caused focus issues.
|
// became unnecessary, removing the code below caused focus issues.
|
||||||
|
|
|
||||||
|
|
@ -523,8 +523,7 @@
|
||||||
tabbrowser="content"
|
tabbrowser="content"
|
||||||
flex="1"
|
flex="1"
|
||||||
setfocus="false"
|
setfocus="false"
|
||||||
tooltip="tabbrowser-tab-tooltip"
|
tooltip="tabbrowser-tab-tooltip">
|
||||||
stopwatchid="FX_TAB_CLICK_MS">
|
|
||||||
<tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
|
<tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
|
||||||
</tabs>
|
</tabs>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
||||||
"resource://gre/modules/Task.jsm");
|
"resource://gre/modules/Task.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon",
|
XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon",
|
||||||
"resource:///modules/DownloadsCommon.jsm");
|
"resource:///modules/DownloadsCommon.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
|
||||||
"resource://gre/modules/TelemetryStopwatch.jsm");
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "console",
|
XPCOMUtils.defineLazyModuleGetter(this, "console",
|
||||||
"resource://gre/modules/Console.jsm");
|
"resource://gre/modules/Console.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
|
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
|
||||||
|
|
@ -154,8 +152,6 @@ Sanitizer.prototype = {
|
||||||
// we catch and store them, but continue to sanitize as much as possible.
|
// we catch and store them, but continue to sanitize as much as possible.
|
||||||
// Callers should check returned errors and give user feedback
|
// Callers should check returned errors and give user feedback
|
||||||
// about items that could not be sanitized
|
// about items that could not be sanitized
|
||||||
let refObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_TOTAL", refObj);
|
|
||||||
|
|
||||||
let annotateError = (name, ex) => {
|
let annotateError = (name, ex) => {
|
||||||
progress[name] = "failed";
|
progress[name] = "failed";
|
||||||
|
|
@ -188,7 +184,7 @@ Sanitizer.prototype = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sanitization is complete.
|
// Sanitization is complete.
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_TOTAL", refObj);
|
|
||||||
// Reset the inProgress preference since we were not killed during
|
// Reset the inProgress preference since we were not killed during
|
||||||
// sanitization.
|
// sanitization.
|
||||||
Preferences.reset(Sanitizer.PREF_SANITIZE_IN_PROGRESS);
|
Preferences.reset(Sanitizer.PREF_SANITIZE_IN_PROGRESS);
|
||||||
|
|
@ -210,8 +206,6 @@ Sanitizer.prototype = {
|
||||||
cache: {
|
cache: {
|
||||||
clear: Task.async(function* (range) {
|
clear: Task.async(function* (range) {
|
||||||
let seenException;
|
let seenException;
|
||||||
let refObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_CACHE", refObj);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Cache doesn't consult timespan, nor does it have the
|
// Cache doesn't consult timespan, nor does it have the
|
||||||
|
|
@ -232,7 +226,6 @@ Sanitizer.prototype = {
|
||||||
seenException = ex;
|
seenException = ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_CACHE", refObj);
|
|
||||||
if (seenException) {
|
if (seenException) {
|
||||||
throw seenException;
|
throw seenException;
|
||||||
}
|
}
|
||||||
|
|
@ -243,10 +236,8 @@ Sanitizer.prototype = {
|
||||||
clear: Task.async(function* (range) {
|
clear: Task.async(function* (range) {
|
||||||
let seenException;
|
let seenException;
|
||||||
let yieldCounter = 0;
|
let yieldCounter = 0;
|
||||||
let refObj = {};
|
|
||||||
|
|
||||||
// Clear cookies.
|
// Clear cookies.
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_COOKIES_2", refObj);
|
|
||||||
try {
|
try {
|
||||||
let cookieMgr = Components.classes["@mozilla.org/cookiemanager;1"]
|
let cookieMgr = Components.classes["@mozilla.org/cookiemanager;1"]
|
||||||
.getService(Ci.nsICookieManager);
|
.getService(Ci.nsICookieManager);
|
||||||
|
|
@ -274,8 +265,6 @@ Sanitizer.prototype = {
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
seenException = ex;
|
seenException = ex;
|
||||||
} finally {
|
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_COOKIES_2", refObj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear deviceIds. Done asynchronously (returns before complete).
|
// Clear deviceIds. Done asynchronously (returns before complete).
|
||||||
|
|
@ -332,13 +321,6 @@ Sanitizer.prototype = {
|
||||||
if (!range || age >= 0) {
|
if (!range || age >= 0) {
|
||||||
let tags = ph.getPluginTags();
|
let tags = ph.getPluginTags();
|
||||||
for (let tag of tags) {
|
for (let tag of tags) {
|
||||||
let refObj = {};
|
|
||||||
let probe = "";
|
|
||||||
if (/\bFlash\b/.test(tag.name)) {
|
|
||||||
probe = tag.loaded ? "FX_SANITIZE_LOADED_FLASH"
|
|
||||||
: "FX_SANITIZE_UNLOADED_FLASH";
|
|
||||||
TelemetryStopwatch.start(probe, refObj);
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
let rv = yield new Promise(resolve =>
|
let rv = yield new Promise(resolve =>
|
||||||
ph.clearSiteData(tag, null, FLAG_CLEAR_ALL, age, resolve)
|
ph.clearSiteData(tag, null, FLAG_CLEAR_ALL, age, resolve)
|
||||||
|
|
@ -349,14 +331,8 @@ Sanitizer.prototype = {
|
||||||
ph.clearSiteData(tag, null, FLAG_CLEAR_ALL, -1, resolve)
|
ph.clearSiteData(tag, null, FLAG_CLEAR_ALL, -1, resolve)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (probe) {
|
|
||||||
TelemetryStopwatch.finish(probe, refObj);
|
|
||||||
}
|
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
// Ignore errors from plug-ins
|
// Ignore errors from plug-ins
|
||||||
if (probe) {
|
|
||||||
TelemetryStopwatch.cancel(probe, refObj);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -413,8 +389,6 @@ Sanitizer.prototype = {
|
||||||
history: {
|
history: {
|
||||||
clear: Task.async(function* (range) {
|
clear: Task.async(function* (range) {
|
||||||
let seenException;
|
let seenException;
|
||||||
let refObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_HISTORY", refObj);
|
|
||||||
try {
|
try {
|
||||||
if (range) {
|
if (range) {
|
||||||
yield PlacesUtils.history.removeVisitsByFilter({
|
yield PlacesUtils.history.removeVisitsByFilter({
|
||||||
|
|
@ -427,8 +401,6 @@ Sanitizer.prototype = {
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
seenException = ex;
|
seenException = ex;
|
||||||
} finally {
|
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_HISTORY", refObj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -455,8 +427,6 @@ Sanitizer.prototype = {
|
||||||
formdata: {
|
formdata: {
|
||||||
clear: Task.async(function* (range) {
|
clear: Task.async(function* (range) {
|
||||||
let seenException;
|
let seenException;
|
||||||
let refObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_FORMDATA", refObj);
|
|
||||||
try {
|
try {
|
||||||
// Clear undo history of all searchBars
|
// Clear undo history of all searchBars
|
||||||
let windows = Services.wm.getEnumerator("navigator:browser");
|
let windows = Services.wm.getEnumerator("navigator:browser");
|
||||||
|
|
@ -504,7 +474,6 @@ Sanitizer.prototype = {
|
||||||
seenException = ex;
|
seenException = ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_FORMDATA", refObj);
|
|
||||||
if (seenException) {
|
if (seenException) {
|
||||||
throw seenException;
|
throw seenException;
|
||||||
}
|
}
|
||||||
|
|
@ -513,8 +482,6 @@ Sanitizer.prototype = {
|
||||||
|
|
||||||
downloads: {
|
downloads: {
|
||||||
clear: Task.async(function* (range) {
|
clear: Task.async(function* (range) {
|
||||||
let refObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_DOWNLOADS", refObj);
|
|
||||||
try {
|
try {
|
||||||
let filterByTime = null;
|
let filterByTime = null;
|
||||||
if (range) {
|
if (range) {
|
||||||
|
|
@ -528,16 +495,13 @@ Sanitizer.prototype = {
|
||||||
// Clear all completed/cancelled downloads
|
// Clear all completed/cancelled downloads
|
||||||
let list = yield Downloads.getList(Downloads.ALL);
|
let list = yield Downloads.getList(Downloads.ALL);
|
||||||
list.removeFinished(filterByTime);
|
list.removeFinished(filterByTime);
|
||||||
} finally {
|
} catch (ex) {
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_DOWNLOADS", refObj);
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
sessions: {
|
sessions: {
|
||||||
clear: Task.async(function* (range) {
|
clear: Task.async(function* (range) {
|
||||||
let refObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_SESSIONS", refObj);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// clear all auth tokens
|
// clear all auth tokens
|
||||||
|
|
@ -547,17 +511,14 @@ Sanitizer.prototype = {
|
||||||
|
|
||||||
// clear FTP and plain HTTP auth sessions
|
// clear FTP and plain HTTP auth sessions
|
||||||
Services.obs.notifyObservers(null, "net:clear-active-logins", null);
|
Services.obs.notifyObservers(null, "net:clear-active-logins", null);
|
||||||
} finally {
|
} catch (ex) {
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_SESSIONS", refObj);
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
siteSettings: {
|
siteSettings: {
|
||||||
clear: Task.async(function* (range) {
|
clear: Task.async(function* (range) {
|
||||||
let seenException;
|
let seenException;
|
||||||
let refObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_SITESETTINGS", refObj);
|
|
||||||
|
|
||||||
let startDateMS = range ? range[0] / 1000 : null;
|
let startDateMS = range ? range[0] / 1000 : null;
|
||||||
|
|
||||||
|
|
@ -615,7 +576,6 @@ Sanitizer.prototype = {
|
||||||
seenException = ex;
|
seenException = ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_SITESETTINGS", refObj);
|
|
||||||
if (seenException) {
|
if (seenException) {
|
||||||
throw seenException;
|
throw seenException;
|
||||||
}
|
}
|
||||||
|
|
@ -672,9 +632,6 @@ Sanitizer.prototype = {
|
||||||
|
|
||||||
// If/once we get here, we should actually be able to close all windows.
|
// If/once we get here, we should actually be able to close all windows.
|
||||||
|
|
||||||
let refObj = {};
|
|
||||||
TelemetryStopwatch.start("FX_SANITIZE_OPENWINDOWS", refObj);
|
|
||||||
|
|
||||||
// First create a new window. We do this first so that on non-mac, we don't
|
// First create a new window. We do this first so that on non-mac, we don't
|
||||||
// accidentally close the app by closing all the windows.
|
// accidentally close the app by closing all the windows.
|
||||||
let handler = Cc["@mozilla.org/browser/clh;1"].getService(Ci.nsIBrowserHandler);
|
let handler = Cc["@mozilla.org/browser/clh;1"].getService(Ci.nsIBrowserHandler);
|
||||||
|
|
@ -719,7 +676,6 @@ Sanitizer.prototype = {
|
||||||
newWindowOpened = true;
|
newWindowOpened = true;
|
||||||
// If we're the last thing to happen, invoke callback.
|
// If we're the last thing to happen, invoke callback.
|
||||||
if (numWindowsClosing == 0) {
|
if (numWindowsClosing == 0) {
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_OPENWINDOWS", refObj);
|
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -731,7 +687,6 @@ Sanitizer.prototype = {
|
||||||
Services.obs.removeObserver(onWindowClosed, "xul-window-destroyed");
|
Services.obs.removeObserver(onWindowClosed, "xul-window-destroyed");
|
||||||
// If we're the last thing to happen, invoke callback.
|
// If we're the last thing to happen, invoke callback.
|
||||||
if (newWindowOpened) {
|
if (newWindowOpened) {
|
||||||
TelemetryStopwatch.finish("FX_SANITIZE_OPENWINDOWS", refObj);
|
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1054,11 +1054,6 @@
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
<!-- Holds a unique ID for the tab change that's currently being timed.
|
|
||||||
Used to make sure that multiple, rapid tab switches do not try to
|
|
||||||
create overlapping timers. -->
|
|
||||||
<field name="_tabSwitchID">null</field>
|
|
||||||
|
|
||||||
<method name="updateCurrentBrowser">
|
<method name="updateCurrentBrowser">
|
||||||
<parameter name="aForceUpdate"/>
|
<parameter name="aForceUpdate"/>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -1067,33 +1062,6 @@
|
||||||
if (this.mCurrentBrowser == newBrowser && !aForceUpdate)
|
if (this.mCurrentBrowser == newBrowser && !aForceUpdate)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!aForceUpdate) {
|
|
||||||
TelemetryStopwatch.start("FX_TAB_SWITCH_UPDATE_MS");
|
|
||||||
if (!gMultiProcessBrowser) {
|
|
||||||
// old way of measuring tab paint which is not valid with e10s.
|
|
||||||
// Waiting until the next MozAfterPaint ensures that we capture
|
|
||||||
// the time it takes to paint, upload the textures to the compositor,
|
|
||||||
// and then composite.
|
|
||||||
if (this._tabSwitchID) {
|
|
||||||
TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_MS");
|
|
||||||
}
|
|
||||||
|
|
||||||
let tabSwitchID = Symbol();
|
|
||||||
|
|
||||||
TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_MS");
|
|
||||||
this._tabSwitchID = tabSwitchID;
|
|
||||||
|
|
||||||
let onMozAfterPaint = () => {
|
|
||||||
if (this._tabSwitchID === tabSwitchID) {
|
|
||||||
TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_MS");
|
|
||||||
this._tabSwitchID = null;
|
|
||||||
}
|
|
||||||
window.removeEventListener("MozAfterPaint", onMozAfterPaint);
|
|
||||||
}
|
|
||||||
window.addEventListener("MozAfterPaint", onMozAfterPaint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var oldTab = this.mCurrentTab;
|
var oldTab = this.mCurrentTab;
|
||||||
|
|
||||||
// Preview mode should not reset the owner
|
// Preview mode should not reset the owner
|
||||||
|
|
@ -1286,9 +1254,6 @@
|
||||||
});
|
});
|
||||||
this.dispatchEvent(event);
|
this.dispatchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!aForceUpdate)
|
|
||||||
TelemetryStopwatch.finish("FX_TAB_SWITCH_UPDATE_MS");
|
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
@ -4161,8 +4126,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
startTabSwitch: function () {
|
startTabSwitch: function () {
|
||||||
TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
|
|
||||||
TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
|
|
||||||
this.addMarker("AsyncTabSwitch:Start");
|
this.addMarker("AsyncTabSwitch:Start");
|
||||||
this.switchInProgress = true;
|
this.switchInProgress = true;
|
||||||
},
|
},
|
||||||
|
|
@ -4178,31 +4141,18 @@
|
||||||
this.getTabState(this.requestedTab) == this.STATE_LOADED) {
|
this.getTabState(this.requestedTab) == this.STATE_LOADED) {
|
||||||
// After this point the tab has switched from the content thread's point of view.
|
// After this point the tab has switched from the content thread's point of view.
|
||||||
// The changes will be visible after the next refresh driver tick + composite.
|
// The changes will be visible after the next refresh driver tick + composite.
|
||||||
let time = TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
|
|
||||||
if (time != -1) {
|
|
||||||
TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
|
|
||||||
this.log("DEBUG: tab switch time = " + time);
|
|
||||||
this.addMarker("AsyncTabSwitch:Finish");
|
this.addMarker("AsyncTabSwitch:Finish");
|
||||||
}
|
|
||||||
this.switchInProgress = false;
|
this.switchInProgress = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
spinnerDisplayed: function () {
|
spinnerDisplayed: function () {
|
||||||
this.assert(!this.spinnerTab);
|
this.assert(!this.spinnerTab);
|
||||||
TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
|
|
||||||
// We have a second, similar probe for capturing recordings of
|
|
||||||
// when the spinner is displayed for very long periods.
|
|
||||||
TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
|
|
||||||
this.addMarker("AsyncTabSwitch:SpinnerShown");
|
this.addMarker("AsyncTabSwitch:SpinnerShown");
|
||||||
},
|
},
|
||||||
|
|
||||||
spinnerHidden: function () {
|
spinnerHidden: function () {
|
||||||
this.assert(this.spinnerTab);
|
this.assert(this.spinnerTab);
|
||||||
this.log("DEBUG: spinner time = " +
|
|
||||||
TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window));
|
|
||||||
TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
|
|
||||||
TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
|
|
||||||
this.addMarker("AsyncTabSwitch:SpinnerHidden");
|
this.addMarker("AsyncTabSwitch:SpinnerHidden");
|
||||||
// we do not get a onPaint after displaying the spinner
|
// we do not get a onPaint after displaying the spinner
|
||||||
this.maybeFinishTabSwitch();
|
this.maybeFinishTabSwitch();
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "OS",
|
||||||
"resource://gre/modules/osfile.jsm");
|
"resource://gre/modules/osfile.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||||
"resource://gre/modules/PlacesUtils.jsm");
|
"resource://gre/modules/PlacesUtils.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
|
||||||
"resource://gre/modules/TelemetryStopwatch.jsm");
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
|
XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
|
||||||
const kBrandBundle = "chrome://branding/locale/brand.properties";
|
const kBrandBundle = "chrome://branding/locale/brand.properties";
|
||||||
|
|
@ -211,7 +209,6 @@ const AutoMigrate = {
|
||||||
|
|
||||||
undo: Task.async(function* () {
|
undo: Task.async(function* () {
|
||||||
let browserId = Preferences.get(kAutoMigrateBrowserPref, "unknown");
|
let browserId = Preferences.get(kAutoMigrateBrowserPref, "unknown");
|
||||||
TelemetryStopwatch.startKeyed("FX_STARTUP_MIGRATION_UNDO_TOTAL_MS", browserId);
|
|
||||||
let histogram = Services.telemetry.getHistogramById("FX_STARTUP_MIGRATION_AUTOMATED_IMPORT_UNDO");
|
let histogram = Services.telemetry.getHistogramById("FX_STARTUP_MIGRATION_AUTOMATED_IMPORT_UNDO");
|
||||||
histogram.add(0);
|
histogram.add(0);
|
||||||
if (!(yield this.canUndo())) {
|
if (!(yield this.canUndo())) {
|
||||||
|
|
@ -236,38 +233,24 @@ const AutoMigrate = {
|
||||||
Services.telemetry.getKeyedHistogramById(histogramId).add(browserId, this._errorMap[type]);
|
Services.telemetry.getKeyedHistogramById(histogramId).add(browserId, this._errorMap[type]);
|
||||||
};
|
};
|
||||||
|
|
||||||
let startTelemetryStopwatch = resourceType => {
|
|
||||||
let histogramId = `FX_STARTUP_MIGRATION_UNDO_${resourceType.toUpperCase()}_MS`;
|
|
||||||
TelemetryStopwatch.startKeyed(histogramId, browserId);
|
|
||||||
};
|
|
||||||
let stopTelemetryStopwatch = resourceType => {
|
|
||||||
let histogramId = `FX_STARTUP_MIGRATION_UNDO_${resourceType.toUpperCase()}_MS`;
|
|
||||||
TelemetryStopwatch.finishKeyed(histogramId, browserId);
|
|
||||||
};
|
|
||||||
startTelemetryStopwatch("bookmarks");
|
|
||||||
yield this._removeUnchangedBookmarks(stateData.get("bookmarks")).catch(ex => {
|
yield this._removeUnchangedBookmarks(stateData.get("bookmarks")).catch(ex => {
|
||||||
Cu.reportError("Uncaught exception when removing unchanged bookmarks!");
|
Cu.reportError("Uncaught exception when removing unchanged bookmarks!");
|
||||||
Cu.reportError(ex);
|
Cu.reportError(ex);
|
||||||
});
|
});
|
||||||
stopTelemetryStopwatch("bookmarks");
|
|
||||||
reportErrorTelemetry("bookmarks");
|
reportErrorTelemetry("bookmarks");
|
||||||
histogram.add(15);
|
histogram.add(15);
|
||||||
|
|
||||||
startTelemetryStopwatch("visits");
|
|
||||||
yield this._removeSomeVisits(stateData.get("visits")).catch(ex => {
|
yield this._removeSomeVisits(stateData.get("visits")).catch(ex => {
|
||||||
Cu.reportError("Uncaught exception when removing history visits!");
|
Cu.reportError("Uncaught exception when removing history visits!");
|
||||||
Cu.reportError(ex);
|
Cu.reportError(ex);
|
||||||
});
|
});
|
||||||
stopTelemetryStopwatch("visits");
|
|
||||||
reportErrorTelemetry("visits");
|
reportErrorTelemetry("visits");
|
||||||
histogram.add(20);
|
histogram.add(20);
|
||||||
|
|
||||||
startTelemetryStopwatch("logins");
|
|
||||||
yield this._removeUnchangedLogins(stateData.get("logins")).catch(ex => {
|
yield this._removeUnchangedLogins(stateData.get("logins")).catch(ex => {
|
||||||
Cu.reportError("Uncaught exception when removing unchanged logins!");
|
Cu.reportError("Uncaught exception when removing unchanged logins!");
|
||||||
Cu.reportError(ex);
|
Cu.reportError(ex);
|
||||||
});
|
});
|
||||||
stopTelemetryStopwatch("logins");
|
|
||||||
reportErrorTelemetry("logins");
|
reportErrorTelemetry("logins");
|
||||||
histogram.add(25);
|
histogram.add(25);
|
||||||
|
|
||||||
|
|
@ -278,7 +261,6 @@ const AutoMigrate = {
|
||||||
|
|
||||||
this._purgeUndoState(this.UNDO_REMOVED_REASON_UNDO_USED);
|
this._purgeUndoState(this.UNDO_REMOVED_REASON_UNDO_USED);
|
||||||
histogram.add(30);
|
histogram.add(30);
|
||||||
TelemetryStopwatch.finishKeyed("FX_STARTUP_MIGRATION_UNDO_TOTAL_MS", browserId);
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
_removeNotificationBars() {
|
_removeNotificationBars() {
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "ResponsivenessMonitor",
|
||||||
"resource://gre/modules/ResponsivenessMonitor.jsm");
|
"resource://gre/modules/ResponsivenessMonitor.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "Sqlite",
|
XPCOMUtils.defineLazyModuleGetter(this, "Sqlite",
|
||||||
"resource://gre/modules/Sqlite.jsm");
|
"resource://gre/modules/Sqlite.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
|
||||||
"resource://gre/modules/TelemetryStopwatch.jsm");
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "WindowsRegistry",
|
XPCOMUtils.defineLazyModuleGetter(this, "WindowsRegistry",
|
||||||
"resource://gre/modules/WindowsRegistry.jsm");
|
"resource://gre/modules/WindowsRegistry.jsm");
|
||||||
|
|
||||||
|
|
@ -254,14 +252,6 @@ this.MigratorPrototype = {
|
||||||
|
|
||||||
let browserKey = this.getBrowserKey();
|
let browserKey = this.getBrowserKey();
|
||||||
|
|
||||||
let maybeStartTelemetryStopwatch = resourceType => {
|
|
||||||
let histogramId = getHistogramIdForResourceType(resourceType, "FX_MIGRATION_*_IMPORT_MS");
|
|
||||||
if (histogramId) {
|
|
||||||
TelemetryStopwatch.startKeyed(histogramId, browserKey);
|
|
||||||
}
|
|
||||||
return histogramId;
|
|
||||||
};
|
|
||||||
|
|
||||||
let maybeStartResponsivenessMonitor = resourceType => {
|
let maybeStartResponsivenessMonitor = resourceType => {
|
||||||
let responsivenessMonitor;
|
let responsivenessMonitor;
|
||||||
let responsivenessHistogramId =
|
let responsivenessHistogramId =
|
||||||
|
|
@ -323,8 +313,6 @@ this.MigratorPrototype = {
|
||||||
for (let [migrationType, itemResources] of resourcesGroupedByItems) {
|
for (let [migrationType, itemResources] of resourcesGroupedByItems) {
|
||||||
notify("Migration:ItemBeforeMigrate", migrationType);
|
notify("Migration:ItemBeforeMigrate", migrationType);
|
||||||
|
|
||||||
let stopwatchHistogramId = maybeStartTelemetryStopwatch(migrationType);
|
|
||||||
|
|
||||||
let {responsivenessMonitor, responsivenessHistogramId} =
|
let {responsivenessMonitor, responsivenessHistogramId} =
|
||||||
maybeStartResponsivenessMonitor(migrationType);
|
maybeStartResponsivenessMonitor(migrationType);
|
||||||
|
|
||||||
|
|
@ -340,10 +328,6 @@ this.MigratorPrototype = {
|
||||||
migrationType);
|
migrationType);
|
||||||
resourcesGroupedByItems.delete(migrationType);
|
resourcesGroupedByItems.delete(migrationType);
|
||||||
|
|
||||||
if (stopwatchHistogramId) {
|
|
||||||
TelemetryStopwatch.finishKeyed(stopwatchHistogramId, browserKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
maybeFinishResponsivenessMonitor(responsivenessMonitor, responsivenessHistogramId);
|
maybeFinishResponsivenessMonitor(responsivenessMonitor, responsivenessHistogramId);
|
||||||
|
|
||||||
if (resourcesGroupedByItems.size == 0) {
|
if (resourcesGroupedByItems.size == 0) {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
Components.utils.import("resource://gre/modules/TelemetryStopwatch.jsm");
|
|
||||||
|
|
||||||
var gHistoryTree;
|
var gHistoryTree;
|
||||||
var gSearchBox;
|
var gSearchBox;
|
||||||
var gHistoryGrouping = "";
|
var gHistoryGrouping = "";
|
||||||
|
|
@ -81,16 +79,11 @@ function searchHistory(aInput)
|
||||||
options.resultType = resultType;
|
options.resultType = resultType;
|
||||||
options.includeHidden = !!aInput;
|
options.includeHidden = !!aInput;
|
||||||
|
|
||||||
if (gHistoryGrouping == "lastvisited")
|
|
||||||
this.TelemetryStopwatch.start("HISTORY_LASTVISITED_TREE_QUERY_TIME_MS");
|
|
||||||
|
|
||||||
// call load() on the tree manually
|
// call load() on the tree manually
|
||||||
// instead of setting the place attribute in history-panel.xul
|
// instead of setting the place attribute in history-panel.xul
|
||||||
// otherwise, we will end up calling load() twice
|
// otherwise, we will end up calling load() twice
|
||||||
gHistoryTree.load([query], options);
|
gHistoryTree.load([query], options);
|
||||||
|
|
||||||
if (gHistoryGrouping == "lastvisited")
|
|
||||||
this.TelemetryStopwatch.finish("HISTORY_LASTVISITED_TREE_QUERY_TIME_MS");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("SidebarFocused",
|
window.addEventListener("SidebarFocused",
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Components.utils.import("resource://gre/modules/TelemetryStopwatch.jsm");
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "MigrationUtils",
|
XPCOMUtils.defineLazyModuleGetter(this, "MigrationUtils",
|
||||||
"resource:///modules/MigrationUtils.jsm");
|
"resource:///modules/MigrationUtils.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
||||||
|
|
@ -810,9 +809,7 @@ var PlacesSearchBox = {
|
||||||
currentView.load([query], options);
|
currentView.load([query], options);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TelemetryStopwatch.start(HISTORY_LIBRARY_SEARCH_TELEMETRY);
|
|
||||||
currentView.applyFilter(filterString, null, true);
|
currentView.applyFilter(filterString, null, true);
|
||||||
TelemetryStopwatch.finish(HISTORY_LIBRARY_SEARCH_TELEMETRY);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "downloads":
|
case "downloads":
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils",
|
||||||
"resource://gre/modules/PromiseUtils.jsm");
|
"resource://gre/modules/PromiseUtils.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "RunState",
|
XPCOMUtils.defineLazyModuleGetter(this, "RunState",
|
||||||
"resource:///modules/sessionstore/RunState.jsm");
|
"resource:///modules/sessionstore/RunState.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
|
||||||
"resource://gre/modules/TelemetryStopwatch.jsm");
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
||||||
"resource://gre/modules/Task.jsm");
|
"resource://gre/modules/Task.jsm");
|
||||||
XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",
|
XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ const Ci = Components.interfaces;
|
||||||
Cu.import("resource://gre/modules/Timer.jsm", this);
|
Cu.import("resource://gre/modules/Timer.jsm", this);
|
||||||
Cu.import("resource://gre/modules/Services.jsm", this);
|
Cu.import("resource://gre/modules/Services.jsm", this);
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||||
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", this);
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
|
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
|
||||||
"resource://gre/modules/AppConstants.jsm");
|
"resource://gre/modules/AppConstants.jsm");
|
||||||
|
|
@ -52,19 +51,6 @@ function notify(subject, topic) {
|
||||||
Services.obs.notifyObservers(subject, topic, "");
|
Services.obs.notifyObservers(subject, topic, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TelemetryStopwatch helper functions.
|
|
||||||
function stopWatch(method) {
|
|
||||||
return function (...histograms) {
|
|
||||||
for (let hist of histograms) {
|
|
||||||
TelemetryStopwatch[method]("FX_SESSION_RESTORE_" + hist);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var stopWatchStart = stopWatch("start");
|
|
||||||
var stopWatchCancel = stopWatch("cancel");
|
|
||||||
var stopWatchFinish = stopWatch("finish");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The external API implemented by the SessionSaver module.
|
* The external API implemented by the SessionSaver module.
|
||||||
*/
|
*/
|
||||||
|
|
@ -182,7 +168,6 @@ var SessionSaverInternal = {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
stopWatchStart("COLLECT_DATA_MS", "COLLECT_DATA_LONGEST_OP_MS");
|
|
||||||
let state = SessionStore.getCurrentState(forceUpdateAllWindows);
|
let state = SessionStore.getCurrentState(forceUpdateAllWindows);
|
||||||
PrivacyFilter.filterPrivateWindowsAndTabs(state);
|
PrivacyFilter.filterPrivateWindowsAndTabs(state);
|
||||||
|
|
||||||
|
|
@ -226,7 +211,6 @@ var SessionSaverInternal = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stopWatchFinish("COLLECT_DATA_MS", "COLLECT_DATA_LONGEST_OP_MS");
|
|
||||||
return this._writeState(state);
|
return this._writeState(state);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,6 @@ Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm", this);
|
||||||
Cu.import("resource://gre/modules/Promise.jsm", this);
|
Cu.import("resource://gre/modules/Promise.jsm", this);
|
||||||
Cu.import("resource://gre/modules/Services.jsm", this);
|
Cu.import("resource://gre/modules/Services.jsm", this);
|
||||||
Cu.import("resource://gre/modules/Task.jsm", this);
|
Cu.import("resource://gre/modules/Task.jsm", this);
|
||||||
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", this);
|
|
||||||
Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", this);
|
Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", this);
|
||||||
Cu.import("resource://gre/modules/Timer.jsm", this);
|
Cu.import("resource://gre/modules/Timer.jsm", this);
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||||
|
|
@ -564,7 +563,6 @@ var SessionStoreInternal = {
|
||||||
* Initialize the session using the state provided by SessionStartup
|
* Initialize the session using the state provided by SessionStartup
|
||||||
*/
|
*/
|
||||||
initSession: function () {
|
initSession: function () {
|
||||||
TelemetryStopwatch.start("FX_SESSION_RESTORE_STARTUP_INIT_SESSION_MS");
|
|
||||||
let state;
|
let state;
|
||||||
let ss = gSessionStartup;
|
let ss = gSessionStartup;
|
||||||
|
|
||||||
|
|
@ -640,7 +638,6 @@ var SessionStoreInternal = {
|
||||||
this._prefBranch.getBoolPref("sessionstore.resume_session_once"))
|
this._prefBranch.getBoolPref("sessionstore.resume_session_once"))
|
||||||
this._prefBranch.setBoolPref("sessionstore.resume_session_once", false);
|
this._prefBranch.setBoolPref("sessionstore.resume_session_once", false);
|
||||||
|
|
||||||
TelemetryStopwatch.finish("FX_SESSION_RESTORE_STARTUP_INIT_SESSION_MS");
|
|
||||||
return state;
|
return state;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -1247,9 +1244,7 @@ var SessionStoreInternal = {
|
||||||
if (initialState) {
|
if (initialState) {
|
||||||
Services.obs.notifyObservers(null, NOTIFY_RESTORING_ON_STARTUP, "");
|
Services.obs.notifyObservers(null, NOTIFY_RESTORING_ON_STARTUP, "");
|
||||||
}
|
}
|
||||||
TelemetryStopwatch.start("FX_SESSION_RESTORE_STARTUP_ONLOAD_INITIAL_WINDOW_MS");
|
|
||||||
this.initializeWindow(aWindow, initialState);
|
this.initializeWindow(aWindow, initialState);
|
||||||
TelemetryStopwatch.finish("FX_SESSION_RESTORE_STARTUP_ONLOAD_INITIAL_WINDOW_MS");
|
|
||||||
|
|
||||||
// Let everyone know we're done.
|
// Let everyone know we're done.
|
||||||
this._deferredInitialized.resolve();
|
this._deferredInitialized.resolve();
|
||||||
|
|
@ -2857,7 +2852,6 @@ var SessionStoreInternal = {
|
||||||
|
|
||||||
var activeWindow = this._getMostRecentBrowserWindow();
|
var activeWindow = this._getMostRecentBrowserWindow();
|
||||||
|
|
||||||
TelemetryStopwatch.start("FX_SESSION_RESTORE_COLLECT_ALL_WINDOWS_DATA_MS");
|
|
||||||
if (RunState.isRunning) {
|
if (RunState.isRunning) {
|
||||||
// update the data for all windows with activities since the last save operation
|
// update the data for all windows with activities since the last save operation
|
||||||
this._forEachBrowserWindow(function(aWindow) {
|
this._forEachBrowserWindow(function(aWindow) {
|
||||||
|
|
@ -2872,7 +2866,6 @@ var SessionStoreInternal = {
|
||||||
});
|
});
|
||||||
DirtyWindows.clear();
|
DirtyWindows.clear();
|
||||||
}
|
}
|
||||||
TelemetryStopwatch.finish("FX_SESSION_RESTORE_COLLECT_ALL_WINDOWS_DATA_MS");
|
|
||||||
|
|
||||||
// An array that at the end will hold all current window data.
|
// An array that at the end will hold all current window data.
|
||||||
var total = [];
|
var total = [];
|
||||||
|
|
@ -2892,9 +2885,7 @@ var SessionStoreInternal = {
|
||||||
nonPopupCount++;
|
nonPopupCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
TelemetryStopwatch.start("FX_SESSION_RESTORE_COLLECT_COOKIES_MS");
|
|
||||||
SessionCookies.update(total);
|
SessionCookies.update(total);
|
||||||
TelemetryStopwatch.finish("FX_SESSION_RESTORE_COLLECT_COOKIES_MS");
|
|
||||||
|
|
||||||
// collect the data for all windows yet to be restored
|
// collect the data for all windows yet to be restored
|
||||||
for (ix in this._statesToRestore) {
|
for (ix in this._statesToRestore) {
|
||||||
|
|
@ -3063,8 +3054,6 @@ var SessionStoreInternal = {
|
||||||
if (aWindow && (!aWindow.__SSi || !this._windows[aWindow.__SSi]))
|
if (aWindow && (!aWindow.__SSi || !this._windows[aWindow.__SSi]))
|
||||||
this.onLoad(aWindow);
|
this.onLoad(aWindow);
|
||||||
|
|
||||||
TelemetryStopwatch.start("FX_SESSION_RESTORE_RESTORE_WINDOW_MS");
|
|
||||||
|
|
||||||
// We're not returning from this before we end up calling restoreTabs
|
// We're not returning from this before we end up calling restoreTabs
|
||||||
// for this window, so make sure we send the SSWindowStateBusy event.
|
// for this window, so make sure we send the SSWindowStateBusy event.
|
||||||
this._setWindowStateBusy(aWindow);
|
this._setWindowStateBusy(aWindow);
|
||||||
|
|
@ -3235,8 +3224,6 @@ var SessionStoreInternal = {
|
||||||
// set smoothScroll back to the original value
|
// set smoothScroll back to the original value
|
||||||
tabstrip.smoothScroll = smoothScroll;
|
tabstrip.smoothScroll = smoothScroll;
|
||||||
|
|
||||||
TelemetryStopwatch.finish("FX_SESSION_RESTORE_RESTORE_WINDOW_MS");
|
|
||||||
|
|
||||||
this._setWindowStateReady(aWindow);
|
this._setWindowStateReady(aWindow);
|
||||||
|
|
||||||
this._sendWindowRestoredNotification(aWindow);
|
this._sendWindowRestoredNotification(aWindow);
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ const Cr = Components.results;
|
||||||
const Cu = Components.utils;
|
const Cu = Components.utils;
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm");
|
|
||||||
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/Promise.jsm");
|
Cu.import("resource://gre/modules/Promise.jsm");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue