Skip to content

Commit

Permalink
Bug 974353 - Add MOZ_COUNT_[CD]TOR to SharedMemory - r=bent
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit Jacob committed Feb 26, 2014
1 parent 2a72567 commit 67e58bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions ipc/glue/SharedMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ SharedMemory::SharedMemory()
: mAllocSize(0)
, mMappedSize(0)
{
MOZ_COUNT_CTOR(SharedMemory);
static Atomic<bool> registered;
if (registered.compareExchange(false, true)) {
RegisterStrongMemoryReporter(new ShmemReporter());
Expand Down
9 changes: 7 additions & 2 deletions ipc/glue/SharedMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,19 @@ namespace ipc {
class SharedMemory
{
public:
virtual ~SharedMemory()
{
MOZ_COUNT_DTOR(SharedMemory);
Unmapped();
Destroyed();
}

enum SharedMemoryType {
TYPE_BASIC,
TYPE_SYSV,
TYPE_UNKNOWN
};

virtual ~SharedMemory() { Unmapped(); Destroyed(); }

size_t Size() const { return mMappedSize; }

virtual void* memory() const = 0;
Expand Down

0 comments on commit 67e58bb

Please sign in to comment.