mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1034922 - Make nsSiteWindow's destructor private, and expose it to nsContentTreeOwner via friend class. r=Enn
CLOSED TREE
This commit is contained in:
parent
7bb9c7cdd7
commit
0d844ee3a9
@ -57,25 +57,25 @@ using namespace mozilla;
|
||||
|
||||
class nsSiteWindow : public nsIEmbeddingSiteWindow
|
||||
{
|
||||
// nsSiteWindow shares a lifetime with nsContentTreeOwner, and proxies it's
|
||||
// AddRef and Release calls to said object.
|
||||
// When nsContentTreeOwner is destroyed, nsSiteWindow will be destroyed as well.
|
||||
// nsContentTreeOwner is a friend class of nsSiteWindow such that it can call
|
||||
// nsSiteWindow's destructor, which is private, as public destructors
|
||||
// on reference counted classes are generally unsafe.
|
||||
friend class nsContentTreeOwner;
|
||||
|
||||
public:
|
||||
explicit nsSiteWindow(nsContentTreeOwner *aAggregator);
|
||||
virtual ~nsSiteWindow();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIEMBEDDINGSITEWINDOW
|
||||
|
||||
private:
|
||||
virtual ~nsSiteWindow();
|
||||
nsContentTreeOwner *mAggregator;
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
template<>
|
||||
struct HasDangerousPublicDestructor<nsSiteWindow>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
//*** nsContentTreeOwner: Object Management
|
||||
//*****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user