Bug 784198 - browserIter.docShell is undefined errors. r=felipe
authorJared Wein <jwein@mozilla.com>
Wed, 22 Aug 2012 13:56:10 -0700
changeset 105095 d0d826d18cec3ca3399560c75404486e310b1277
parent 105094 2b5032429f8002154baaf7534254a6f19841ff70
child 105096 903124068c0799a3056cc023942431eca8e1b924
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersfelipe
bugs784198
milestone17.0a1
Bug 784198 - browserIter.docShell is undefined errors. r=felipe
browser/base/content/browser-social.js
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -389,22 +389,16 @@ var SocialToolbar = {
         iconImage.setAttribute("src", icon.iconURL);
       iconImage.setAttribute("notifBrowserId", notifBrowserId);
 
       iconCounter.collapsed = !icon.counter;
       iconCounter.firstChild.textContent = icon.counter || "";
     }
     notifBox.appendChild(notifBrowsers);
     iconBox.appendChild(iconContainers);
-
-    let browserIter = notifBox.firstElementChild;
-    while (browserIter) {
-      browserIter.docShell.isAppTab = true;
-      browserIter = browserIter.nextElementSibling;
-    }
   },
 
   showAmbientPopup: function SocialToolbar_showAmbientPopup(iconContainer) {
     let iconImage = iconContainer.firstChild;
     let panel = document.getElementById("social-notification-panel");
     let notifBox = document.getElementById("social-notification-box");
     let notifBrowser = document.getElementById(iconImage.getAttribute("notifBrowserId"));
 
@@ -449,16 +443,17 @@ var SocialToolbar = {
       panel.removeEventListener("popuphiding", onpopuphiding);
       SocialToolbar.button.removeAttribute("open");
       dispatchPanelEvent("socialFrameHide");
     });
 
     panel.addEventListener("popupshown", function onpopupshown() {
       panel.removeEventListener("popupshown", onpopupshown);
       SocialToolbar.button.setAttribute("open", "true");
+      notifBrowser.docShell.isAppTab = true;
       if (notifBrowser.contentDocument.readyState == "complete") {
         dispatchPanelEvent("socialFrameShow");
       } else {
         // first time load, wait for load and dispatch after load
         notifBrowser.addEventListener("load", function panelBrowserOnload(e) {
           notifBrowser.removeEventListener("load", panelBrowserOnload, true);
           setTimeout(function() {
             dispatchPanelEvent("socialFrameShow");