Bug 1028588 - Fix dangerous public destructors in docshell/ - r=smaug

This commit is contained in:
Benoit Jacob 2014-06-23 14:49:08 -04:00
parent 960f977388
commit 96263a4d4e
8 changed files with 18 additions and 8 deletions

View File

@ -106,6 +106,8 @@ public:
{}
private:
~LoadContext() {}
nsWeakPtr mTopFrameElement;
uint64_t mNestedFrameId;
uint32_t mAppId;

View File

@ -16,12 +16,12 @@ public:
NS_DECL_NSIABOUTMODULE
nsAboutRedirector() {}
virtual ~nsAboutRedirector() {}
static nsresult
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
protected:
virtual ~nsAboutRedirector() {}
};
#define NS_ABOUT_REDIRECTOR_MODULE_CID \

View File

@ -430,11 +430,11 @@ public:
mLoadGroup(loadGroup)
{}
~nsPingListener();
nsresult StartTimeout();
private:
~nsPingListener();
bool mRequireSameHost;
nsCOMPtr<nsIContent> mContent;
nsCOMPtr<nsILoadGroup> mLoadGroup;
@ -8764,6 +8764,8 @@ public:
}
private:
~nsCopyFaviconCallback() {}
nsCOMPtr<nsIURI> mNewURI;
bool mInPrivateBrowsing;
};

View File

@ -923,11 +923,11 @@ public:
class InterfaceRequestorProxy : public nsIInterfaceRequestor {
public:
InterfaceRequestorProxy(nsIInterfaceRequestor* p);
virtual ~InterfaceRequestorProxy();
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINTERFACEREQUESTOR
protected:
virtual ~InterfaceRequestorProxy();
InterfaceRequestorProxy() {}
nsWeakPtr mWeakPtr;
};

View File

@ -37,11 +37,12 @@ protected:
enumerateForwards,
enumerateBackwards
};
virtual ~nsDocShellEnumerator();
public:
nsDocShellEnumerator(int32_t inEnumerationDirection);
virtual ~nsDocShellEnumerator();
// nsISupports
NS_DECL_ISUPPORTS

View File

@ -14,11 +14,12 @@ class nsTransferableHookData : public nsIClipboardDragDropHookList
{
public:
nsTransferableHookData();
virtual ~nsTransferableHookData();
NS_DECL_ISUPPORTS
NS_DECL_NSICLIPBOARDDRAGDROPHOOKLIST
protected:
virtual ~nsTransferableHookData();
nsCOMArray<nsIClipboardDragDropHooks> mHookList;
};

View File

@ -20,6 +20,9 @@ public:
NS_DECL_NSIDOWNLOADHISTORY
NS_DEFINE_STATIC_CID_ACCESSOR(NS_DOWNLOADHISTORY_CID)
private:
~nsDownloadHistory() {}
};
#endif // __nsDownloadHistory_h__

View File

@ -38,13 +38,14 @@ class nsSHEntryShared MOZ_FINAL : public nsIBFCacheEntry,
static void Shutdown();
nsSHEntryShared();
~nsSHEntryShared();
NS_DECL_ISUPPORTS
NS_DECL_NSIMUTATIONOBSERVER
NS_DECL_NSIBFCACHEENTRY
private:
~nsSHEntryShared();
friend class nsSHEntry;
friend class HistoryTracker;