Bug 1266832 - add dummy telemetry object to Services shim; r?gregtatum
MozReview-Commit-ID: Cg6ciWVNbEx
--- a/devtools/client/shared/shim/Services.js
+++ b/devtools/client/shared/shim/Services.js
@@ -496,16 +496,34 @@ const Services = {
},
// This is only used by telemetry, which is disabled for the
// content case. So, being totally wrong is ok.
get is64Bit() {
return true;
},
},
+
+ /**
+ * A no-op implementation of Services.telemetry. This supports just
+ * the subset of Services.telemetry that is used by devtools.
+ */
+ telemetry: {
+ getHistogramById: function (name) {
+ return {
+ add: () => {}
+ };
+ },
+
+ getKeyedHistogramById: function (name) {
+ return {
+ add: () => {}
+ };
+ },
+ },
};
/**
* Create a new preference. This is used during startup (see
* devtools/client/preferences/devtools.js) to install the
* default preferences.
*
* @param {String} name the name of the preference