Bug 1313876 - Fixed _undoCloseMiddleClick function call in event listener. r=jaws
authorDavid Malaschonok <davidmalaschonok@gmail.com>
Sun, 30 Oct 2016 11:29:24 +0100
changeset 347002 2cd8ae6771b2585a8abcdb4e5f930acca1e8a2e1
parent 347001 0124edce0553b43a9c320356fa9d1c175bb352c5
child 347003 62c5218b7325723c8d88d5c4cfe4fa241f905406
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1313876
milestone52.0a1
Bug 1313876 - Fixed _undoCloseMiddleClick function call in event listener. r=jaws MozReview-Commit-ID: 3hkpkldzxRW
browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm
--- a/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm
+++ b/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm
@@ -164,17 +164,17 @@ function createEntry(aTagName, aIsWindow
   tabData = aIsWindowsFragment ? aClosedTab
                      : aClosedTab.state;
   let activeIndex = (tabData.index || tabData.entries.length) - 1;
   if (activeIndex >= 0 && tabData.entries[activeIndex]) {
     element.setAttribute("targetURI", tabData.entries[activeIndex].url);
   }
 
   if (!aIsWindowsFragment) {
-    element.addEventListener("click", this._undoCloseMiddleClick, false);
+    element.addEventListener("click", RecentlyClosedTabsAndWindowsMenuUtils._undoCloseMiddleClick, false);
   }
   if (aIndex == 0) {
     element.setAttribute("key", "key_undoClose" + (aIsWindowsFragment? "Window" : "Tab"));
   }
 
   aFragment.appendChild(element);
 }
 
@@ -206,9 +206,9 @@ function createRestoreAllEntry(aDocument
                                   "for (var i = 0; i < " + aEntryCount + "; i++) undoClose" +
                                     (aIsWindowsFragment? "Window" : "Tab") + "();");
   if (aPrefixRestoreAll) {
     aFragment.insertBefore(restoreAllElements, aFragment.firstChild);
   } else {
     aFragment.appendChild(aDocument.createElementNS(kNSXUL, "menuseparator"));
     aFragment.appendChild(restoreAllElements);
   }
-}
+}
\ No newline at end of file