Bug 861716 - catch exception thrown from gIndicatorWindow.updateIndicatorState(). r=florian
authorMunro Mengjue Chiang <mchiang@mozilla.com>
Thu, 08 Jun 2017 16:05:34 +0800
changeset 363587 95d89b5bcc9ce49e7b2aac86ca2068088c3f5fc1
parent 363586 4f5477c79f4f3526f00236749f7ede14d1d699cd
child 363640 c1310883d535a2b96e85a1e94bd17e2e5f0c526b
push id44622
push usercbook@mozilla.com
push dateTue, 13 Jun 2017 09:53:12 +0000
treeherderautoland@95d89b5bcc9c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs861716
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;
   }
 }