Make IsPermanent non-virtual so it can be called in the destructor. b=334605 r=mrbkap rs=brendan
git-svn-id: svn://10.0.0.236/trunk@194715 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user