Bug 1154482 - about:webrtc intermittently throws a js type error. r=jib, a=lizzard
authorPaul Kerr [:pkerr] <pkerr@mozilla.com>
Tue, 14 Apr 2015 15:41:07 -0700
changeset 267112 fb10a430555d03019ce9dd9c203183e9f18080d0
parent 267111 7c2d250ea3f251575544176861959ff3aa7fa26a
child 267113 ae4189b7a0429ac40575c87c1f8367f40d2a450c
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, lizzard
bugs1154482
milestone39.0a2
Bug 1154482 - about:webrtc intermittently throws a js type error. r=jib, a=lizzard
toolkit/content/aboutwebrtc/aboutWebrtc.js
--- a/toolkit/content/aboutwebrtc/aboutWebrtc.js
+++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js
@@ -653,16 +653,20 @@ ICEStats.prototype = {
       stat[c.type] = this.candidateToString(c);
       stats.push(stat);
     };
 
     return stats.sort((a, b) => (b.priority || 0) - (a.priority || 0));
   },
 
   candidateToString: function(c) {
+    if (!c) {
+      return "*";
+    }
+
     var type = c.candidateType;
 
     if (c.type == "localcandidate" && c.candidateType == "relayed") {
       type = `${c.candidateType}-${c.mozLocalTransport}`;
     }
 
     return `${c.ipAddress}:${c.portNumber}/${c.transport}(${type})`;
   }