Bug 1383908 check if we're running in a main window before using CUI, r?Gijs
MozReview-Commit-ID: K8H4IesdQsV
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -357,17 +357,17 @@ SocialShare = {
}
this.defaultButton.setAttribute("checked", "true");
},
get shareButton() {
// web-panels (bookmark/sidebar) don't include customizableui, so
// nsContextMenu fails when accessing shareButton, breaking
// browser_bug409481.js.
- if (!window.CustomizableUI)
+ if (document.documentElement.getAttribute("windowtype") !== "navigator:browser")
return null;
let widget = CustomizableUI.getWidget("social-share-button");
if (!widget || !widget.areaType)
return null;
return widget.forWindow(window).node;
},
_onclick() {