Bug 1233438 - Fix error in TelemetryEnvironment for addons where description is undefined. r=gfritzsche a=ritu
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Fri, 18 Dec 2015 17:25:47 +0700
changeset 310493 cee07fcf667693297d665b08d8517e5f4eb92b97
parent 310492 1ce623a9f899f532baa5746ff28243660f322c60
child 310494 8e41d75f63faf347ebc0993e64ff3ea1d1686589
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche, ritu
bugs1233438
milestone45.0a2
Bug 1233438 - Fix error in TelemetryEnvironment for addons where description is undefined. r=gfritzsche a=ritu
toolkit/components/telemetry/TelemetryEnvironment.jsm
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -256,17 +256,17 @@ function getGfxField(aPropertyName, aDef
  * Returns a substring of the input string.
  *
  * @param {String} aString The input string.
  * @param {Integer} aMaxLength The maximum length of the returned substring. If this is
  *        greater than the length of the input string, we return the whole input string.
  * @return {String} The substring or null if the input string is null.
  */
 function limitStringToLength(aString, aMaxLength) {
-  if (aString === null) {
+  if (aString === null || aString === undefined) {
     return null;
   }
   return aString.substring(0, aMaxLength);
 }
 
 /**
  * Get the information about a graphic adapter.
  *