Issue #21 - Remove calls to Services.telemetry and nsITelemetry

These calls would cause breakage without the supporting plumbing.
This commit is contained in:
Moonchild 2021-12-05 11:37:04 +00:00 • committed by roytam1
commit d562709920
8 changed files with 3 additions and 137 deletions

View file

@ -40,7 +40,6 @@ var DoPreloadPostfork = function(aCallback) {
Cc["@mozilla.org/appshell/appShellService;1"].getService(Ci["nsIAppShellService"]);
Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci["nsIWindowMediator"]);
Cc["@mozilla.org/base/telemetry;1"].getService(Ci["nsITelemetry"]);
Cc["@mozilla.org/categorymanager;1"].getService(Ci["nsICategoryManager"]);
Cc["@mozilla.org/childprocessmessagemanager;1"].getService(Ci["nsIMessageSender"]);
Cc["@mozilla.org/consoleservice;1"].getService(Ci["nsIConsoleService"]);

View file

@ -1405,22 +1405,6 @@ PeerConnectionObserver.prototype = {
handleIceConnectionStateChange: function(iceConnectionState) {
let pc = this._dompc;
if (pc.iceConnectionState === 'new') {
var checking_histogram = Services.telemetry.getHistogramById("WEBRTC_ICE_CHECKING_RATE");
if (iceConnectionState === 'checking') {
checking_histogram.add(true);
} else if (iceConnectionState === 'failed') {
checking_histogram.add(false);
}
} else if (pc.iceConnectionState === 'checking') {
var success_histogram = Services.telemetry.getHistogramById("WEBRTC_ICE_SUCCESS_RATE");
if (iceConnectionState === 'completed' ||
iceConnectionState === 'connected') {
success_histogram.add(true);
} else if (iceConnectionState === 'failed') {
success_histogram.add(false);
}
}
if (iceConnectionState === 'failed') {
pc.logError("ICE failed, see about:webrtc for more details");