Bug 984786 part 7: Give NS_INLINE_DECL_*REFCOUNTING classes private destructor & MOZ_FINAL annotation where appropriate, in /netwerk. r=hurley

This commit is contained in:
Daniel Holbert 2014-04-02 11:20:46 -07:00
Родитель 45c4d25757
Коммит 826df07705
2 изменённых файлов: 14 добавлений и 4 удалений

Просмотреть файл

@ -155,12 +155,19 @@ struct CookieDomainTuple
// encapsulates in-memory and on-disk DB states, so we can
// conveniently switch state when entering or exiting private browsing.
struct DBState
struct DBState MOZ_FINAL
{
DBState() : cookieCount(0), cookieOldestTime(INT64_MAX), corruptFlag(OK)
{
}
private:
// Private destructor, to discourage deletion outside of Release():
~DBState()
{
}
public:
NS_INLINE_DECL_REFCOUNTING(DBState)
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;

Просмотреть файл

@ -35,7 +35,7 @@ class ChannelEvent
class AutoEventEnqueuerBase;
class ChannelEventQueue
class ChannelEventQueue MOZ_FINAL
{
NS_INLINE_DECL_REFCOUNTING(ChannelEventQueue)
@ -47,8 +47,6 @@ class ChannelEventQueue
, mFlushing(false)
, mOwner(owner) {}
~ChannelEventQueue() {}
// Checks to determine if an IPDL-generated channel event can be processed
// immediately, or needs to be queued using Enqueue().
inline bool ShouldEnqueue();
@ -77,6 +75,11 @@ class ChannelEventQueue
nsresult RetargetDeliveryTo(nsIEventTarget* aTargetThread);
private:
// Private destructor, to discourage deletion outside of Release():
~ChannelEventQueue()
{
}
inline void MaybeFlushQueue();
void FlushQueue();
inline void CompleteResume();