Bug 1168653 - B2G telemetry needs to ignore search service r=gfritzsche a=sledru
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -866,16 +866,21 @@ EnvironmentCache.prototype = {
return name;
},
/**
* Update the default search engine value.
*/
_updateSearchEngine: function () {
+ if (!Services.search) {
+ // Just ignore cases where the search service is not implemented.
+ return;
+ }
+
this._log.trace("_updateSearchEngine - isInitialized: " + Services.search.isInitialized);
if (!Services.search.isInitialized) {
return;
}
// Make sure we have a settings section.
this._currentEnvironment.settings = this._currentEnvironment.settings || {};
// Update the search engine entry in the current environment.