Index: ipc/ipc_channel_reader.cc |
diff --git a/ipc/ipc_channel_reader.cc b/ipc/ipc_channel_reader.cc |
index a76b7e654b30a7a575e8350774a27288da43b931..f80d75d8e1ee98ca9c58c63ed1bd2e4bd7e9c094 100644 |
--- a/ipc/ipc_channel_reader.cc |
+++ b/ipc/ipc_channel_reader.cc |
@@ -20,8 +20,7 @@ ChannelReader::ChannelReader(Listener* listener) : listener_(listener) { |
} |
ChannelReader::~ChannelReader() { |
- if (!blocked_ids_.empty()) |
- StopObservingAttachmentBroker(); |
+ DCHECK(blocked_ids_.empty()); |
} |
ChannelReader::DispatchState ChannelReader::ProcessIncomingMessages() { |
@@ -62,6 +61,13 @@ bool ChannelReader::IsHelloMessage(const Message& m) { |
m.type() == Channel::HELLO_MESSAGE_TYPE; |
} |
+void ChannelReader::CleanUp() { |
+ if (!blocked_ids_.empty()) { |
+ StopObservingAttachmentBroker(); |
+ blocked_ids_.clear(); |
+ } |
+} |
+ |
bool ChannelReader::TranslateInputData(const char* input_data, |
int input_data_len) { |
const char* p; |