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
Родитель 8a9c5fbb0a
Коммит 4d45e43c54
2 изменённых файлов: 6 добавлений и 0 удалений

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

@ -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_;
}

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

@ -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_;
}