Bug 1365852 - immediately return in updateIndicatorState() if webrtcIndicator hasn't finished loading. r?florian
MozReview-Commit-ID: D6MZn6khaJO
--- a/browser/base/content/webrtcIndicator.js
+++ b/browser/base/content/webrtcIndicator.js
@@ -34,16 +34,20 @@ function init(event) {
// Alert accessibility implementations stuff just changed. We only need to do
// this initially, because changes after this will automatically fire alert
// events if things change materially.
let ev = new CustomEvent("AlertActive", {bubbles: true, cancelable: true});
document.documentElement.dispatchEvent(ev);
}
function updateIndicatorState() {
+ // If gStringBundle isn't set, the window hasn't finished loading.
+ if (!gStringBundle)
+ return;
+
updateWindowAttr("sharingvideo", webrtcUI.showCameraIndicator);
updateWindowAttr("sharingaudio", webrtcUI.showMicrophoneIndicator);
updateWindowAttr("sharingscreen", webrtcUI.showScreenSharingIndicator);
// Camera and microphone button tooltip.
let shareTypes = [];
if (webrtcUI.showCameraIndicator)
shareTypes.push("Camera");