mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Make IsPermanent non-virtual so it can be called in the destructor. b=334605 r=mrbkap rs=brendan
This commit is contained in:
parent
dbbb2a5e98
commit
19cdeba085
@ -410,6 +410,12 @@ AtomImpl::~AtomImpl()
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(AtomImpl, nsIAtom)
|
||||
|
||||
PermanentAtomImpl::PermanentAtomImpl()
|
||||
: AtomImpl()
|
||||
{
|
||||
mRefCnt = REFCNT_PERMANENT_SENTINEL;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt) PermanentAtomImpl::AddRef()
|
||||
{
|
||||
return 2;
|
||||
@ -420,18 +426,6 @@ NS_IMETHODIMP_(nsrefcnt) PermanentAtomImpl::Release()
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* virtual */ PRBool
|
||||
AtomImpl::IsPermanent()
|
||||
{
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
/* virtual */ PRBool
|
||||
PermanentAtomImpl::IsPermanent()
|
||||
{
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
void* AtomImpl::operator new ( size_t size, const nsACString& aString ) CPP_THROW_NEW
|
||||
{
|
||||
/*
|
||||
|
@ -59,7 +59,9 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIATOM
|
||||
|
||||
virtual PRBool IsPermanent();
|
||||
enum { REFCNT_PERMANENT_SENTINEL = PR_UINT32_MAX };
|
||||
|
||||
PRBool IsPermanent() { return mRefCnt == REFCNT_PERMANENT_SENTINEL; }
|
||||
|
||||
void* operator new(size_t size, const nsACString& aString) CPP_THROW_NEW;
|
||||
|
||||
@ -81,14 +83,10 @@ public:
|
||||
|
||||
class PermanentAtomImpl : public AtomImpl {
|
||||
public:
|
||||
#ifdef AIX
|
||||
PermanentAtomImpl() : AtomImpl() {}
|
||||
#endif
|
||||
PermanentAtomImpl();
|
||||
NS_IMETHOD_(nsrefcnt) AddRef();
|
||||
NS_IMETHOD_(nsrefcnt) Release();
|
||||
|
||||
virtual PRBool IsPermanent();
|
||||
|
||||
void* operator new(size_t size, const nsACString& aString) CPP_THROW_NEW {
|
||||
return AtomImpl::operator new(size, aString);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user