Bug 1473585 - Remove restoreLastSession function. r=dao
authorManish Kumar <1991manish.kumar@gmail.com>
Sat, 07 Jul 2018 20:29:56 +0200
changeset 816219 8bcdfbe1d0dcf4ce58095da36fd8371fa68f7c3d
parent 816218 bd281782dc93474944f6a9375312e7e3a31cd061
child 816220 1b3143e4ec831f400df95c1fef8ee87d6f3368d2
push id115778
push userbmo:mstriemer@mozilla.com
push dateTue, 10 Jul 2018 18:49:28 +0000
reviewersdao
bugs1473585
milestone63.0a1
Bug 1473585 - Remove restoreLastSession function. r=dao
browser/base/content/browser-sets.inc
browser/base/content/browser.js
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -85,17 +85,17 @@
     <command id="cmd_fullZoomReduce"  oncommand="FullZoom.reduce()"/>
     <command id="cmd_fullZoomEnlarge" oncommand="FullZoom.enlarge()"/>
     <command id="cmd_fullZoomReset"   oncommand="FullZoom.reset()"/>
     <command id="cmd_fullZoomToggle"  oncommand="ZoomManager.toggleZoom();"/>
     <command id="cmd_gestureRotateLeft" oncommand="gGestureSupport.rotate(event.sourceEvent)"/>
     <command id="cmd_gestureRotateRight" oncommand="gGestureSupport.rotate(event.sourceEvent)"/>
     <command id="cmd_gestureRotateEnd" oncommand="gGestureSupport.rotateEnd()"/>
     <command id="Browser:OpenLocation" oncommand="openLocation();"/>
-    <command id="Browser:RestoreLastSession" oncommand="restoreLastSession();" disabled="true"/>
+    <command id="Browser:RestoreLastSession" oncommand="SessionStore.restoreLastSession();" disabled="true"/>
     <command id="Browser:NewUserContextTab" oncommand="openNewUserContextTab(event.sourceEvent);"/>
     <command id="Browser:OpenAboutContainers" oncommand="openPreferences('paneContainers', {origin: 'ContainersCommand'});"/>
 
     <command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
     <command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/>
     <command id="Tools:Addons" oncommand="BrowserOpenAddonsMgr();"/>
     <command id="Tools:Sanitize" oncommand="Sanitizer.showUI(window);"/>
     <command id="Tools:PrivateBrowsing"
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7769,20 +7769,16 @@ var RestoreLastSessionObserver = {
     Services.obs.removeObserver(this, "sessionstore-last-session-cleared");
     goSetCommandEnabled("Browser:RestoreLastSession", false);
   },
 
   QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
                                           Ci.nsISupportsWeakReference])
 };
 
-function restoreLastSession() {
-  SessionStore.restoreLastSession();
-}
-
 /* Observes menus and adjusts their size for better
  * usability when opened via a touch screen. */
 var MenuTouchModeObserver = {
   init() {
     window.addEventListener("popupshowing", this, true);
   },
 
   handleEvent(event) {