Bug 1154482 - about:webrtc intermittently throws a js type error. r=jib, a=sledru
authorPaul Kerr [:pkerr] <pkerr@mozilla.com>
Tue, 14 Apr 2015 15:41:07 -0700
changeset 258529 899ee022ed4c
parent 258528 38e095acde46
child 258530 e5d6dc48f6de
push id4690
push userryanvm@gmail.com
push date2015-04-20 16:04 +0000
treeherdermozilla-beta@eb5e2063637b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, sledru
bugs1154482
milestone38.0
Bug 1154482 - about:webrtc intermittently throws a js type error. r=jib, a=sledru
toolkit/content/aboutwebrtc/aboutWebrtc.js
--- a/toolkit/content/aboutwebrtc/aboutWebrtc.js
+++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js
@@ -509,16 +509,20 @@ function round00(num) {
   return Math.round(num * 100) / 100;
 }
 
 function labelize(label) {
   return `${label.charAt(0).toUpperCase()}${label.slice(1)}`;
 }
 
 function candidateToString(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})`;
 }