Bug 1490158 - Update comm-central for nsISHistoryListener changes. r=frg
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 12 Sep 2018 10:13:23 +1000
changeset 33159 4a211a1901dd5017780dc5667aad3b1ecb2d308e
parent 33158 d01e5283a6d7ea8c7b5643f314f92ce48d71936c
child 33160 4fa52926ba4ca23231d2df2c5ce819666bbf4652
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersfrg
bugs1490158
Bug 1490158 - Update comm-central for nsISHistoryListener changes. r=frg This patch removes `OnLengthChanged` and `OnIndexChanged`, and the return values from `OnHistoryGotoIndex` and `OnHistoryPurge`, as per the mozilla-central changes in this bug. This patch also cleans up some pre-existing inconsistencies: it removes the unneeded `OnHistoryGoForward` and `OnHistoryGoBack`, and adds the needed `OnHistoryReplaceEntry`.
suite/components/sessionstore/nsSessionStore.js
--- a/suite/components/sessionstore/nsSessionStore.js
+++ b/suite/components/sessionstore/nsSessionStore.js
@@ -4197,30 +4197,23 @@ function SessionStoreSHistoryListener(ss
 
 SessionStoreSHistoryListener.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISHistoryListener,
                                          Ci.nsISupportsWeakReference]),
   browser: null,
   ss: null,
   tab: null,
   OnHistoryNewEntry: function(aNewURI) { },
-  OnHistoryGoBack: function(aBackURI) { return true; },
-  OnHistoryGoForward: function(aForwardURI) { return true; },
-  OnHistoryGotoIndex: function(aIndex, aGotoURI) { return true; },
-  OnHistoryPurge: function(aNumEntries) { return true; },
+  OnHistoryGotoIndex: function(aIndex, aGotoURI) { },
+  OnHistoryPurge: function(aNumEntries) { },
   OnHistoryReload: function(aReloadURI, aReloadFlags) {
     // On reload, we want to make sure that session history loads the right
     // URI. In order to do that, we will just call restoreTab. That will remove
     // the history listener and load the right URI.
     this.ss.restoreTab(this.tab);
     // Returning false will stop the load that docshell is attempting.
     return false;
   },
-  OnLengthChanged(aCount) {
-    // Ignore, the method is implemented so that XPConnect doesn't throw!
-  },
-  OnIndexChanged(aIndex) {
-    // Ignore, the method is implemented so that XPConnect doesn't throw!
-  },
+  OnHistoryReplaceEntry: function(aIndex) { },
 }
 
 
 var NSGetFactory = XPCOMUtils.generateNSGetFactory([SessionStoreService]);