Bug 861716 - catch exception thrown from gIndicatorWindow.updateIndicatorState(). r?florian draft
authorMunro Mengjue Chiang <mchiang@mozilla.com>
Thu, 08 Jun 2017 16:05:34 +0800
changeset 592988 54c8cd89415ceae251bb11ab926341c31615f41d
parent 592987 a965439d0c7abfea15c999d330d9a1039f5695af
child 632991 b9648fca222d0144a1436f76dc75a69e4a654b93
push id63567
push userbmo:mchiang@mozilla.com
push dateTue, 13 Jun 2017 02:25:20 +0000
reviewersflorian
bugs861716
milestone56.0a1
Bug 861716 - catch exception thrown from gIndicatorWindow.updateIndicatorState(). r?florian MozReview-Commit-ID: IUe0iSAOa7h
browser/modules/webrtcUI.jsm
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -1058,17 +1058,22 @@ function updateIndicators(data, target) 
         if (separator) {
           separator.hidden = true;
         }
       }
     }
   }
 
   if (webrtcUI.showGlobalIndicator) {
-    if (!gIndicatorWindow)
+    if (!gIndicatorWindow) {
       gIndicatorWindow = getGlobalIndicator();
-    else
-      gIndicatorWindow.updateIndicatorState();
+    } else {
+      try {
+        gIndicatorWindow.updateIndicatorState();
+      } catch (err) {
+        Cu.reportError(`error in gIndicatorWindow.updateIndicatorState(): ${err.message}`);
+      }
+    }
   } else if (gIndicatorWindow) {
     gIndicatorWindow.close();
     gIndicatorWindow = null;
   }
 }