Bug 1028588 - Fix dangerous public destructors in embedding/ - r=bsmedberg
☠☠ backed out by 9b33a6d30532 ☠ ☠
authorBenoit Jacob <bjacob@mozilla.com>
Mon, 30 Jun 2014 18:11:52 -0400
changeset 191604 19a19833f1d60e3bed4a16f31cd5ff2f92051bca
parent 191603 d5fae80054de26783e93ca9948cd358965a874b2
child 191605 13a8bae671ca9d52b34de3db0ea1e97d9937ef5b
push id27055
push usercbook@mozilla.com
push dateTue, 01 Jul 2014 12:01:46 +0000
treeherdermozilla-central@4a9353b5762d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1028588
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1028588 - Fix dangerous public destructors in embedding/ - r=bsmedberg
embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
embedding/browser/webBrowser/nsDocShellTreeOwner.h
embedding/browser/webBrowser/nsEmbedStream.h
embedding/browser/webBrowser/nsWebBrowserContentPolicy.h
embedding/components/appstartup/src/nsAppStartupNotifier.h
embedding/components/commandhandler/src/nsBaseCommandController.h
embedding/components/commandhandler/src/nsCommandGroup.cpp
embedding/components/commandhandler/src/nsCommandGroup.h
embedding/components/commandhandler/src/nsCommandManager.h
embedding/components/commandhandler/src/nsCommandParams.h
embedding/components/commandhandler/src/nsControllerCommandTable.h
embedding/components/find/src/nsFind.cpp
embedding/components/find/src/nsFind.h
embedding/components/find/src/nsWebBrowserFind.h
embedding/components/printingui/src/unixshared/nsPrintProgress.h
embedding/components/printingui/src/unixshared/nsPrintProgressParams.h
embedding/components/printingui/src/unixshared/nsPrintingPromptService.h
embedding/components/windowwatcher/src/nsDialogParamBlock.h
embedding/components/windowwatcher/src/nsWindowWatcher.cpp
embedding/components/windowwatcher/src/nsWindowWatcher.h
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -991,24 +991,26 @@ nsDocShellTreeOwner::GetOwnerRequestor()
 
 class DefaultTooltipTextProvider MOZ_FINAL : public nsITooltipTextProvider
 {
 public:
     DefaultTooltipTextProvider();
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSITOOLTIPTEXTPROVIDER
-    
+
 protected:
+    ~DefaultTooltipTextProvider() {}
+
     nsCOMPtr<nsIAtom>   mTag_dialog;
     nsCOMPtr<nsIAtom>   mTag_dialogheader;
     nsCOMPtr<nsIAtom>   mTag_window;
 };
 
-NS_IMPL_ISUPPORTS(DefaultTooltipTextProvider, nsITooltipTextProvider)
+// NS_IMPL_ISUPPORTS(DefaultTooltipTextProvider, nsITooltipTextProvider)
 
 DefaultTooltipTextProvider::DefaultTooltipTextProvider()
 {
     // There are certain element types which we don't want to use
     // as tool tip text. 
     mTag_dialog       = do_GetAtom("dialog");
     mTag_dialogheader = do_GetAtom("dialogheader");
     mTag_window       = do_GetAtom("window");   
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.h
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.h
@@ -141,21 +141,23 @@ protected:
 //
 // The class that listens to the chrome events and tells the embedding
 // chrome to show tooltips, as appropriate. Handles registering itself
 // with the DOM with AddChromeListeners() and removing itself with
 // RemoveChromeListeners().
 //
 class ChromeTooltipListener : public nsIDOMEventListener
 {
+protected:
+  virtual ~ChromeTooltipListener ( ) ;
+
 public:
   NS_DECL_ISUPPORTS
   
   ChromeTooltipListener ( nsWebBrowser* inBrowser, nsIWebBrowserChrome* inChrome ) ;
-  virtual ~ChromeTooltipListener ( ) ;
 
   NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
   NS_IMETHOD MouseMove(nsIDOMEvent* aMouseEvent);
 
     // Add/remove the relevant listeners, based on what interfaces
     // the embedding chrome implements.
   NS_IMETHOD AddChromeListeners();
   NS_IMETHOD RemoveChromeListeners();
@@ -213,21 +215,23 @@ private:
 //
 // The class that listens to the chrome events and tells the embedding
 // chrome to show context menus, as appropriate. Handles registering itself
 // with the DOM with AddChromeListeners() and removing itself with
 // RemoveChromeListeners().
 //
 class ChromeContextMenuListener : public nsIDOMEventListener
 {
+protected:
+  virtual ~ChromeContextMenuListener ( ) ;
+
 public:
   NS_DECL_ISUPPORTS
   
   ChromeContextMenuListener ( nsWebBrowser* inBrowser, nsIWebBrowserChrome* inChrome ) ;
-  virtual ~ChromeContextMenuListener ( ) ;
 
   // nsIDOMContextMenuListener
   NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
 
   // Add/remove the relevant listeners, based on what interfaces
   // the embedding chrome implements.
   NS_IMETHOD AddChromeListeners();
   NS_IMETHOD RemoveChromeListeners();
--- a/embedding/browser/webBrowser/nsEmbedStream.h
+++ b/embedding/browser/webBrowser/nsEmbedStream.h
@@ -11,25 +11,27 @@
 #include "nsIURI.h"
 #include "nsIWebBrowser.h"
 
 class nsEmbedStream : public nsISupports
 {
  public:
 
   nsEmbedStream();
-  virtual ~nsEmbedStream();
 
   void      InitOwner      (nsIWebBrowser *aOwner);
   NS_METHOD Init           (void);
 
   NS_METHOD OpenStream     (nsIURI *aBaseURI, const nsACString& aContentType);
   NS_METHOD AppendToStream (const uint8_t *aData, uint32_t aLen);
   NS_METHOD CloseStream    (void);
 
   NS_DECL_ISUPPORTS
 
+ protected:
+  virtual ~nsEmbedStream();
+
  private:
   nsIWebBrowser            *mOwner;
   nsCOMPtr<nsIOutputStream> mOutputStream;
 };
 
 #endif // nsEmbedStream_h__
--- a/embedding/browser/webBrowser/nsWebBrowserContentPolicy.h
+++ b/embedding/browser/webBrowser/nsWebBrowserContentPolicy.h
@@ -9,16 +9,18 @@
 /* f66bc334-1dd1-11b2-bab2-90e04fe15c19 */
 #define NS_WEBBROWSERCONTENTPOLICY_CID \
 { 0xf66bc334, 0x1dd1, 0x11b2, { 0xba, 0xb2, 0x90, 0xe0, 0x4f, 0xe1, 0x5c, 0x19 } }
 
 #define NS_WEBBROWSERCONTENTPOLICY_CONTRACTID "@mozilla.org/embedding/browser/content-policy;1"
 
 class nsWebBrowserContentPolicy : public nsIContentPolicy
 {
+protected:
+    virtual ~nsWebBrowserContentPolicy();
+
 public:
     nsWebBrowserContentPolicy();
-    virtual ~nsWebBrowserContentPolicy();
-    
+
     NS_DECL_ISUPPORTS
     NS_DECL_NSICONTENTPOLICY
 };
 
--- a/embedding/components/appstartup/src/nsAppStartupNotifier.h
+++ b/embedding/components/appstartup/src/nsAppStartupNotifier.h
@@ -16,13 +16,15 @@ class nsAppStartupNotifier : public nsIO
 {
 public:
     NS_DEFINE_STATIC_CID_ACCESSOR( NS_APPSTARTUPNOTIFIER_CID )
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIOBSERVER
 
     nsAppStartupNotifier();
+
+protected:
     virtual ~nsAppStartupNotifier();
 };
 
 #endif /* nsAppStartupNotifier_h___ */
 
--- a/embedding/components/commandhandler/src/nsBaseCommandController.h
+++ b/embedding/components/commandhandler/src/nsBaseCommandController.h
@@ -22,34 +22,36 @@
 //   and all other text and html editing
 class nsBaseCommandController :  public nsIController,
                             public nsIControllerContext,
                             public nsIInterfaceRequestor,
                             public nsICommandController
 {
 public:
 
-          nsBaseCommandController();
-  virtual ~nsBaseCommandController();
+  nsBaseCommandController();
 
   // nsISupports
   NS_DECL_ISUPPORTS
     
   // nsIController
   NS_DECL_NSICONTROLLER
 
   // nsICommandController
   NS_DECL_NSICOMMANDCONTROLLER
 
   //nsIControllerContext
   NS_DECL_NSICONTROLLERCONTEXT
 
   // nsIInterfaceRequestor
   NS_DECL_NSIINTERFACEREQUESTOR
-  
+
+protected:
+  virtual ~nsBaseCommandController();
+
 private:
 
    nsWeakPtr mCommandContextWeakPtr;
    nsISupports* mCommandContextRawPtr;
    
    // Our reference to the command manager
    nsCOMPtr<nsIControllerCommandTable> mCommandTable;     
 };
--- a/embedding/components/commandhandler/src/nsCommandGroup.cpp
+++ b/embedding/components/commandhandler/src/nsCommandGroup.cpp
@@ -14,22 +14,23 @@
 #include "nsIControllerCommand.h"
 #include "nsCRT.h"
 
 
 class nsGroupsEnumerator : public nsISimpleEnumerator
 {
 public:
   nsGroupsEnumerator(nsControllerCommandGroup::GroupsHashtable &inHashTable);
-  virtual ~nsGroupsEnumerator();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
 protected:
+  virtual ~nsGroupsEnumerator();
+
   static PLDHashOperator HashEnum(const nsACString &aKey, nsTArray<nsCString> *aData, void *aClosure);
   nsresult Initialize();
 
 protected:
 
   nsControllerCommandGroup::GroupsHashtable &mHashTable;
   int32_t mIndex;
   char **mGroupNames;        // array of pointers to char16_t* in the hash table
@@ -127,22 +128,23 @@ nsGroupsEnumerator::Initialize()
 #if 0
 #pragma mark -
 #endif
 
 class nsNamedGroupEnumerator : public nsISimpleEnumerator
 {
 public:
   nsNamedGroupEnumerator(nsTArray<nsCString> *inArray);
-  virtual ~nsNamedGroupEnumerator();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
 protected:
+  virtual ~nsNamedGroupEnumerator();
+
   nsTArray<nsCString> *mGroupArray;
   int32_t mIndex;
 };
 
 nsNamedGroupEnumerator::nsNamedGroupEnumerator(nsTArray<nsCString> *inArray)
 : mGroupArray(inArray)
 , mIndex(-1)
 {
--- a/embedding/components/commandhandler/src/nsCommandGroup.h
+++ b/embedding/components/commandhandler/src/nsCommandGroup.h
@@ -16,25 +16,26 @@
 
 #define NS_CONTROLLER_COMMAND_GROUP_CONTRACTID \
  "@mozilla.org/embedcomp/controller-command-group;1"
 
 class nsControllerCommandGroup : public nsIControllerCommandGroup
 {
 public:
   nsControllerCommandGroup();
-  virtual ~nsControllerCommandGroup();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTROLLERCOMMANDGROUP
 
 public:
   typedef nsClassHashtable<nsCStringHashKey, nsTArray<nsCString>> GroupsHashtable;
 
 protected:
+  virtual ~nsControllerCommandGroup();
+
   void ClearGroupsHash();
 
 protected:
   GroupsHashtable mGroupsHash; // hash keyed on command group.
                                // This could be made more space-efficient, maybe with atoms
 };
 
 #endif // nsCommandGroup_h__
--- a/embedding/components/commandhandler/src/nsCommandManager.h
+++ b/embedding/components/commandhandler/src/nsCommandManager.h
@@ -23,30 +23,30 @@ class nsCommandManager :  public nsIComm
                           public nsPICommandUpdater,
                           public nsSupportsWeakReference
 
 {
 public:
   typedef nsTArray<nsCOMPtr<nsIObserver> > ObserverList;
 
                         nsCommandManager();
-  virtual               ~nsCommandManager();
 
   // nsISupports
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsCommandManager, nsICommandManager)
   
   // nsICommandManager
   NS_DECL_NSICOMMANDMANAGER
   
   // nsPICommandUpdater
   NS_DECL_NSPICOMMANDUPDATER
 
 
 protected:
+  virtual               ~nsCommandManager();
 
   nsresult  GetControllerForCommand(const char * aCommand,
                                     nsIDOMWindow *aDirectedToThisWindow,
                                     nsIController** outController);
 
 
 protected:
   nsClassHashtable<nsCharPtrHashKey, ObserverList> mObserversTable;
--- a/embedding/components/commandhandler/src/nsCommandParams.h
+++ b/embedding/components/commandhandler/src/nsCommandParams.h
@@ -14,25 +14,25 @@
 
 
 
 class nsCommandParams : public nsICommandParams
 {
 public:
 
                       nsCommandParams();
-  virtual             ~nsCommandParams();
   
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSICOMMANDPARAMS
 
   nsresult            Init();
   
 protected:
+  virtual             ~nsCommandParams();
 
   struct HashEntry : public PLDHashEntryHdr
   {
     nsCString      mEntryName;
 
     uint8_t       mEntryType;
     union {
     
--- a/embedding/components/commandhandler/src/nsControllerCommandTable.h
+++ b/embedding/components/commandhandler/src/nsControllerCommandTable.h
@@ -14,24 +14,25 @@
 class nsIControllerCommand;
 
 class  nsControllerCommandTable : public nsIControllerCommandTable,
                                   public nsSupportsWeakReference
 {
 public:
 
                   nsControllerCommandTable();
-  virtual         ~nsControllerCommandTable();
 
   NS_DECL_ISUPPORTS
 
   NS_DECL_NSICONTROLLERCOMMANDTABLE
 
 protected:
 
+  virtual         ~nsControllerCommandTable();
+
   // Hash table of nsIControllerCommands, keyed by command name.
   nsInterfaceHashtable<nsCStringHashKey, nsIControllerCommand> mCommandsTable;
 
   // Are we mutable?
   bool mMutable;
 };
 
 
--- a/embedding/components/find/src/nsFind.cpp
+++ b/embedding/components/find/src/nsFind.cpp
@@ -84,20 +84,16 @@ class nsFindContentIterator : public nsI
 public:
   nsFindContentIterator(bool aFindBackward)
     : mStartOffset(0),
       mEndOffset(0),
       mFindBackward(aFindBackward)
   {
   }
 
-  virtual ~nsFindContentIterator()
-  {
-  }
-
   // nsISupports
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_CLASS(nsFindContentIterator)
 
   // nsIContentIterator
   virtual nsresult Init(nsINode* aRoot)
   {
     NS_NOTREACHED("internal error");
@@ -114,16 +110,21 @@ public:
   virtual void First();
   virtual void Last();
   virtual void Next();
   virtual void Prev();
   virtual nsINode* GetCurrentNode();
   virtual bool IsDone();
   virtual nsresult PositionAt(nsINode* aCurNode);
 
+protected:
+  virtual ~nsFindContentIterator()
+  {
+  }
+
 private:
   nsCOMPtr<nsIContentIterator> mOuterIterator;
   nsCOMPtr<nsIContentIterator> mInnerIterator;
   // Can't use a range here, since we want to represent part of the
   // flattened tree, including native anonymous content.
   nsCOMPtr<nsIDOMNode> mStartNode;
   int32_t mStartOffset;
   nsCOMPtr<nsIDOMNode> mEndNode;
--- a/embedding/components/find/src/nsFind.h
+++ b/embedding/components/find/src/nsFind.h
@@ -29,21 +29,22 @@ class nsFindContentIterator;
 class nsFind : public nsIFind
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_NSIFIND
   NS_DECL_CYCLE_COLLECTION_CLASS(nsFind)
 
   nsFind();
-  virtual ~nsFind();
 
   static already_AddRefed<nsIDOMRange> CreateRange(nsINode* aNode);
 
 protected:
+  virtual ~nsFind();
+
   // Parameters set from the interface:
   //nsCOMPtr<nsIDOMRange> mRange;   // search only in this range
   bool mFindBackward;
   bool mCaseSensitive;
 
   nsCOMPtr<nsIWordBreaker> mWordBreaker;
 
   int32_t mIterOffset;
--- a/embedding/components/find/src/nsWebBrowserFind.h
+++ b/embedding/components/find/src/nsWebBrowserFind.h
@@ -30,30 +30,31 @@ class nsIDocShell;
 // class nsWebBrowserFind
 //*****************************************************************************   
 
 class nsWebBrowserFind  : public nsIWebBrowserFind,
                           public nsIWebBrowserFindInFrames
 {
 public:
                 nsWebBrowserFind();
-    virtual     ~nsWebBrowserFind();
     
     // nsISupports
     NS_DECL_ISUPPORTS
     
     // nsIWebBrowserFind
     NS_DECL_NSIWEBBROWSERFIND
                 
     // nsIWebBrowserFindInFrames
     NS_DECL_NSIWEBBROWSERFINDINFRAMES
 
 
 protected:
-     
+
+    virtual     ~nsWebBrowserFind();
+
     bool        CanFindNext()
                 { return mSearchString.Length() != 0; }
 
     nsresult    SearchInFrame(nsIDOMWindow* aWindow, bool aWrapping,
                               bool* didFind);
 
     nsresult    OnStartSearchFrame(nsIDOMWindow *aWindow);
     nsresult    OnEndSearchFrame(nsIDOMWindow *aWindow);
--- a/embedding/components/printingui/src/unixshared/nsPrintProgress.h
+++ b/embedding/components/printingui/src/unixshared/nsPrintProgress.h
@@ -20,16 +20,18 @@ class nsPrintProgress : public nsIPrintP
 {
 public: 
 	NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress(nsIPrintSettings* aPrintSettings);
+
+protected:
 	virtual ~nsPrintProgress();
 
 private:
   nsresult ReleaseListeners();
 
   bool                              m_closeProgress;
   bool                              m_processCanceled;
   nsString                          m_pendingStatus;
--- a/embedding/components/printingui/src/unixshared/nsPrintProgressParams.h
+++ b/embedding/components/printingui/src/unixshared/nsPrintProgressParams.h
@@ -11,16 +11,18 @@
 
 class nsPrintProgressParams : public nsIPrintProgressParams
 {
 public: 
 	NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESSPARAMS
 
 	nsPrintProgressParams();
+
+protected:
 	virtual ~nsPrintProgressParams();
 
 private:
   nsString mDocTitle;
   nsString mDocURL;
 };
 
 #endif
--- a/embedding/components/printingui/src/unixshared/nsPrintingPromptService.h
+++ b/embedding/components/printingui/src/unixshared/nsPrintingPromptService.h
@@ -27,24 +27,26 @@ class nsIDialogParamBlock;
 
 class nsPrintingPromptService: public nsIPrintingPromptService,
                                public nsIWebProgressListener
 {
 
 public:
 
   nsPrintingPromptService();
-  virtual ~nsPrintingPromptService();
 
   nsresult Init();
 
   NS_DECL_NSIPRINTINGPROMPTSERVICE
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_ISUPPORTS
 
+protected:
+  virtual ~nsPrintingPromptService();
+
 private:
   nsresult DoDialog(nsIDOMWindow *aParent,
                     nsIDialogParamBlock *aParamBlock, 
                     nsIWebBrowserPrint *aWebBrowserPrint, 
                     nsIPrintSettings* aPS,
                     const char *aChromeURL);
 
   nsCOMPtr<nsIWindowWatcher> mWatcher;
--- a/embedding/components/windowwatcher/src/nsDialogParamBlock.h
+++ b/embedding/components/windowwatcher/src/nsDialogParamBlock.h
@@ -15,21 +15,23 @@
  {0x4e4aae11, 0x8901, 0x46cc, {0x82, 0x17, 0xda, 0xd7, 0xc5, 0x41, 0x58, 0x73}}
 
 class nsString;
 
 class nsDialogParamBlock: public nsIDialogParamBlock
 {
 public: 	
   nsDialogParamBlock();
-  virtual ~nsDialogParamBlock();
    
   NS_DECL_NSIDIALOGPARAMBLOCK
   NS_DECL_ISUPPORTS	
 
+protected:
+  virtual ~nsDialogParamBlock();
+
 private:
 
   enum {kNumInts = 8, kNumStrings = 16};
 
   nsresult InBounds(int32_t inIndex, int32_t inMax) {
     return inIndex >= 0 && inIndex < inMax ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
   }
   
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
@@ -139,22 +139,24 @@ void nsWatcherWindowEntry::ReferenceSelf
 /****************************************************************
  ****************** nsWatcherWindowEnumerator *******************
  ****************************************************************/
 
 class nsWatcherWindowEnumerator : public nsISimpleEnumerator {
 
 public:
   nsWatcherWindowEnumerator(nsWindowWatcher *inWatcher);
-  virtual ~nsWatcherWindowEnumerator();
   NS_IMETHOD HasMoreElements(bool *retval);
   NS_IMETHOD GetNext(nsISupports **retval);
 
   NS_DECL_ISUPPORTS
 
+protected:
+  virtual ~nsWatcherWindowEnumerator();
+
 private:
   friend class nsWindowWatcher;
 
   nsWatcherWindowEntry *FindNext();
   void WindowRemoved(nsWatcherWindowEntry *inInfo);
 
   nsWindowWatcher      *mWindowWatcher;
   nsWatcherWindowEntry *mCurrentPosition;
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.h
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.h
@@ -36,33 +36,34 @@ class nsWindowWatcher :
       public nsIWindowWatcher,
       public nsPIWindowWatcher,
       public nsIPromptFactory
 {
 friend class nsWatcherWindowEnumerator;
 
 public:
   nsWindowWatcher();
-  virtual ~nsWindowWatcher();
 
   nsresult Init();
 
   NS_DECL_ISUPPORTS
 
   NS_DECL_NSIWINDOWWATCHER
   NS_DECL_NSPIWINDOWWATCHER
   NS_DECL_NSIPROMPTFACTORY
 
   static int32_t    GetWindowOpenLocation(nsIDOMWindow *aParent,
                                           uint32_t aChromeFlags,
                                           bool aCalledFromJS,
                                           bool aPositionSpecified,
                                           bool aSizeSpecified);
 
 protected:
+  virtual ~nsWindowWatcher();
+
   friend class nsPromptService;
   bool AddEnumerator(nsWatcherWindowEnumerator* inEnumerator);
   bool RemoveEnumerator(nsWatcherWindowEnumerator* inEnumerator);
 
   nsWatcherWindowEntry *FindWindowEntry(nsIDOMWindow *aWindow);
   nsresult RemoveWindow(nsWatcherWindowEntry *inInfo);
 
   // Get the caller tree item.  Look on the JS stack, then fall back