Bug 1313876 - Fixed _undoCloseMiddleClick function call in event listener. r?jaws
MozReview-Commit-ID: 3hkpkldzxRW
--- 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