Bug 664979 - Merge nsISHistory_2_0_BRANCH into nsISHistory; r=bz
authorEd Morley <bmo@edmorley.co.uk>
Sat, 18 Jun 2011 11:03:17 +0200
changeset 71762 54cfcc5aeb7bb3056ca57cd60868bce805084687
parent 71761 779f9476693cc6e3d50c0da31ec5087b328d165b
child 71763 4a20515c93d5967f97bbd9d9651c12ff381b89ea
push idunknown
push userunknown
push dateunknown
reviewersbz
bugs664979
milestone7.0a1
Bug 664979 - Merge nsISHistory_2_0_BRANCH into nsISHistory; r=bz
browser/components/sessionstore/src/nsSessionStore.js
docshell/shistory/public/nsISHistory.idl
docshell/shistory/src/nsSHistory.cpp
docshell/shistory/src/nsSHistory.h
--- a/browser/components/sessionstore/src/nsSessionStore.js
+++ b/browser/components/sessionstore/src/nsSessionStore.js
@@ -2899,17 +2899,17 @@ SessionStoreService.prototype = {
 
       didStartLoad = true;
       try {
         // In order to work around certain issues in session history, we need to
         // force session history to update its internal index and call reload
         // instead of gotoIndex. See bug 597315.
         browser.webNavigation.sessionHistory.getEntryAtIndex(activeIndex, true);
         browser.webNavigation.sessionHistory.
-          QueryInterface(Ci.nsISHistory_2_0_BRANCH).reloadCurrentEntry();
+          QueryInterface(Ci.nsISHistory).reloadCurrentEntry();
       }
       catch (ex) {
         // ignore page load errors
         aTab.removeAttribute("busy");
         didStartLoad = false;
       }
     }
 
--- a/docshell/shistory/public/nsISHistory.idl
+++ b/docshell/shistory/public/nsISHistory.idl
@@ -55,17 +55,17 @@ interface nsISimpleEnumerator;
 
 %{C++
 #define NS_SHISTORY_CID \
 {0x7294fe9c, 0x14d8, 0x11d5, {0x98, 0x82, 0x00, 0xC0, 0x4f, 0xa0, 0x2f, 0x40}}
 
 #define NS_SHISTORY_CONTRACTID "@mozilla.org/browser/shistory;1"
 %}
 
-[scriptable, uuid(9883609F-CDD8-4d83-9B55-868FF08AD433)]
+[scriptable, uuid(ef2c9bcb-96b8-4095-933a-cb1c506f2c58)]
 interface nsISHistory: nsISupports
 {
   /**
    * A readonly property of the interface that returns 
    * the number of toplevel documents currently available
    * in session history.
    */
    readonly attribute long count;
@@ -172,15 +172,11 @@ interface nsISHistory: nsISupports
    *        4) Use nsIHistoryEntry to access properties of each history entry. 
    *
    * @see nsISimpleEnumerator
    * @see nsIHistoryEntry
    * @see QueryInterface()
    * @see do_QueryInterface()
    */
    readonly attribute nsISimpleEnumerator SHistoryEnumerator;
+
+   void reloadCurrentEntry();
 };
-
-[scriptable, uuid(ac8b3eb3-2051-4cce-8303-d6e7938501dd)]
-interface nsISHistory_2_0_BRANCH: nsISHistory
-{
-  void reloadCurrentEntry();
-};
--- a/docshell/shistory/src/nsSHistory.cpp
+++ b/docshell/shistory/src/nsSHistory.cpp
@@ -159,17 +159,16 @@ nsSHistory::~nsSHistory()
 NS_IMPL_ADDREF(nsSHistory)
 NS_IMPL_RELEASE(nsSHistory)
 
 NS_INTERFACE_MAP_BEGIN(nsSHistory)
    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISHistory)
    NS_INTERFACE_MAP_ENTRY(nsISHistory)
    NS_INTERFACE_MAP_ENTRY(nsIWebNavigation)
    NS_INTERFACE_MAP_ENTRY(nsISHistoryInternal)
-   NS_INTERFACE_MAP_ENTRY(nsISHistory_2_0_BRANCH)
 NS_INTERFACE_MAP_END
 
 //*****************************************************************************
 //    nsSHistory: nsISHistory
 //*****************************************************************************
 
 // static
 PRUint32
--- a/docshell/shistory/src/nsSHistory.h
+++ b/docshell/shistory/src/nsSHistory.h
@@ -57,28 +57,27 @@
 
 // Needed to maintain global list of all SHistory objects
 #include "prclist.h"
 
 class nsIDocShell;
 class nsSHEnumerator;
 class nsSHistoryObserver;
 class nsSHistory: public PRCList,
-                  public nsISHistory_2_0_BRANCH,
+                  public nsISHistory,
                   public nsISHistoryInternal,
                   public nsIWebNavigation
 {
 public:
   nsSHistory();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISHISTORY
   NS_DECL_NSISHISTORYINTERNAL
   NS_DECL_NSIWEBNAVIGATION
-  NS_DECL_NSISHISTORY_2_0_BRANCH
 
   // One time initialization method called upon docshell module construction
   static nsresult Startup();
   static void UpdatePrefs(nsIPrefBranch *aPrefBranch);
 
   // Max number of total cached content viewers.  If the pref
   // browser.sessionhistory.max_total_viewers is negative, then
   // this value is calculated based on the total amount of memory.