Bug 1213320 - Detect IPC::Channel leaks with the XPCOM leak checker. r=jld

This commit is contained in:
Andrew McCreight 2015-10-14 11:03:47 -07:00
parent 7219bdb178
commit 8ff287ea02
2 changed files with 6 additions and 0 deletions

View File

@ -1006,13 +1006,16 @@ uint32_t Channel::ChannelImpl::Unsound_NumQueuedMessages() const
Channel::Channel(const std::wstring& channel_id, Mode mode,
Listener* listener)
: channel_impl_(new ChannelImpl(channel_id, mode, listener)) {
MOZ_COUNT_CTOR(IPC::Channel);
}
Channel::Channel(int fd, Mode mode, Listener* listener)
: channel_impl_(new ChannelImpl(fd, mode, listener)) {
MOZ_COUNT_CTOR(IPC::Channel);
}
Channel::~Channel() {
MOZ_COUNT_DTOR(IPC::Channel);
delete channel_impl_;
}

View File

@ -502,14 +502,17 @@ uint32_t Channel::ChannelImpl::Unsound_NumQueuedMessages() const
Channel::Channel(const std::wstring& channel_id, Mode mode,
Listener* listener)
: channel_impl_(new ChannelImpl(channel_id, mode, listener)) {
MOZ_COUNT_CTOR(IPC::Channel);
}
Channel::Channel(const std::wstring& channel_id, void* server_pipe,
Mode mode, Listener* listener)
: channel_impl_(new ChannelImpl(channel_id, server_pipe, mode, listener)) {
MOZ_COUNT_CTOR(IPC::Channel);
}
Channel::~Channel() {
MOZ_COUNT_DTOR(IPC::Channel);
delete channel_impl_;
}