nsMenuX and nsMenuItemX don't need to implement nsIWeakReference. b=400548 r=smorgan sr=roc a=dsicore
authorjoshmoz@gmail.com
Fri, 09 Nov 2007 11:51:27 -0800
changeset 7771 f37344cf166e9549acc6edee36519f18da2d98c3
parent 7770 d51875529aa655c92768c25cb1cd43af5061ec9a
child 7772 3485311c2729a6380b3ed61680839df5ecb0c226
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmorgan, roc, dsicore
bugs400548
milestone1.9b2pre
nsMenuX and nsMenuItemX don't need to implement nsIWeakReference. b=400548 r=smorgan sr=roc a=dsicore
widget/src/cocoa/nsMenuItemX.h
widget/src/cocoa/nsMenuItemX.mm
widget/src/cocoa/nsMenuX.h
widget/src/cocoa/nsMenuX.mm
--- a/widget/src/cocoa/nsMenuItemX.h
+++ b/widget/src/cocoa/nsMenuItemX.h
@@ -37,32 +37,30 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsMenuItemX_h_
 #define nsMenuItemX_h_
 
 #include "nsIMenuItem.h"
 #include "nsString.h"
 #include "nsIChangeManager.h"
-#include "nsWeakReference.h"
 #include "nsIWidget.h"
 #include "nsAutoPtr.h"
 
 #import <Cocoa/Cocoa.h>
 
 class nsIMenu;
 class nsMenuItemIconX;
 
 /**
  * Native Motif MenuItem wrapper
  */
 
 class nsMenuItemX : public nsIMenuItem,
-                    public nsIChangeObserver,
-                    public nsSupportsWeakReference
+                    public nsIChangeObserver
 {
 public:
   nsMenuItemX();
   virtual ~nsMenuItemX();
 
   // nsISupports
   NS_DECL_ISUPPORTS
   NS_DECL_NSICHANGEOBSERVER
--- a/widget/src/cocoa/nsMenuItemX.mm
+++ b/widget/src/cocoa/nsMenuItemX.mm
@@ -52,17 +52,17 @@
 #include "nsIPrivateDOMEvent.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMDocumentEvent.h"
 
 #include "nsMenuItemIconX.h"
 #include "nsGUIEvent.h"
 
 
-NS_IMPL_ISUPPORTS3(nsMenuItemX, nsIMenuItem, nsIChangeObserver, nsISupportsWeakReference)
+NS_IMPL_ISUPPORTS2(nsMenuItemX, nsIMenuItem, nsIChangeObserver)
 
 
 nsMenuItemX::nsMenuItemX()
 {
   mNativeMenuItem     = nil;
   mMenuParent         = nsnull;
   mManager            = nsnull;
   mKeyEquivalent.AssignLiteral(" ");
--- a/widget/src/cocoa/nsMenuX.h
+++ b/widget/src/cocoa/nsMenuX.h
@@ -38,17 +38,16 @@
 
 #ifndef nsMenuX_h_
 #define nsMenuX_h_
 
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "nsIMenu.h"
 #include "nsIChangeManager.h"
-#include "nsWeakReference.h"
 #include "nsMenuBarX.h"
 
 #import <Carbon/Carbon.h>
 #import <Cocoa/Cocoa.h>
 
 
 class nsIMenuBar;
 class nsMenuX;
@@ -63,18 +62,17 @@ class nsMenuItemIconX;
   EventHandlerRef mEventHandler;
   BOOL mHaveInstalledCarbonEvents;
 }
 - (id)initWithGeckoMenu:(nsMenuX*)geckoMenu;
 @end
 
 
 class nsMenuX : public nsIMenu,
-                public nsIChangeObserver,
-                public nsSupportsWeakReference
+                public nsIChangeObserver
 {
 
 public:
     nsMenuX();
     virtual ~nsMenuX();
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSICHANGEOBSERVER
--- a/widget/src/cocoa/nsMenuX.mm
+++ b/widget/src/cocoa/nsMenuX.mm
@@ -78,17 +78,17 @@ extern nsIWidget         * gRollupWidget
 
 static PRBool gConstructingMenu = PR_FALSE;
 
 // CIDs
 #include "nsWidgetsCID.h"
 static NS_DEFINE_CID(kMenuCID,     NS_MENU_CID);
 static NS_DEFINE_CID(kMenuItemCID, NS_MENUITEM_CID);
 
-NS_IMPL_ISUPPORTS3(nsMenuX, nsIMenu, nsIChangeObserver, nsISupportsWeakReference)
+NS_IMPL_ISUPPORTS2(nsMenuX, nsIMenu, nsIChangeObserver)
 
 
 nsMenuX::nsMenuX()
 : mVisibleItemsCount(0), mParent(nsnull), mManager(nsnull), mMacMenuID(0), 
   mMacMenu(nil), mNativeMenuItem(nil), mIsEnabled(PR_TRUE),
   mDestroyHandlerCalled(PR_FALSE), mNeedsRebuild(PR_TRUE),
   mConstructed(PR_FALSE), mVisible(PR_TRUE), mXBLAttached(PR_FALSE)
 {