зеркало из https://github.com/mozilla/gecko-dev.git
Bug 717069 - correct sessionstore-windows-restored usage in TelemetryPing; r=taras
This commit is contained in:
Родитель
7f0433716c
Коммит
7a7a7b1f17
|
@ -634,7 +634,11 @@ TelemetryPing.prototype = {
|
|||
*/
|
||||
uninstall: function uninstall() {
|
||||
this.detachObservers()
|
||||
Services.obs.removeObserver(this, "sessionstore-windows-restored");
|
||||
try {
|
||||
Services.obs.removeObserver(this, "sessionstore-windows-restored");
|
||||
} catch (e) {
|
||||
// Already observed this event.
|
||||
}
|
||||
Services.obs.removeObserver(this, "profile-before-change");
|
||||
Services.obs.removeObserver(this, "private-browsing");
|
||||
Services.obs.removeObserver(this, "quit-application-granted");
|
||||
|
@ -674,6 +678,9 @@ TelemetryPing.prototype = {
|
|||
}
|
||||
break;
|
||||
case "sessionstore-windows-restored":
|
||||
Services.obs.removeObserver(this, "sessionstore-windows-restored");
|
||||
// fall through
|
||||
case "test-gather-startup":
|
||||
this.gatherStartupInformation();
|
||||
break;
|
||||
case "idle-daily":
|
||||
|
|
|
@ -29,7 +29,7 @@ var gFinished = false;
|
|||
|
||||
function telemetry_ping () {
|
||||
const TelemetryPing = Cc["@mozilla.org/base/telemetry-ping;1"].getService(Ci.nsIObserver);
|
||||
TelemetryPing.observe(null, "sessionstore-windows-restored", null);
|
||||
TelemetryPing.observe(null, "test-gather-startup", null);
|
||||
TelemetryPing.observe(null, "test-ping", SERVER);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче