summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 09:08:19 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 09:08:19 +0000
commit3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19 (patch)
treeb26f7f81e48a95473eb4af5304301e9d8cd22fb8 /ipc
parenteef99b6591d82399096abdcee07dd67359eec036 (diff)
downloadchromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.zip
chromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.tar.gz
chromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.tar.bz2
Virtual destructors should have virtual keyword.
Make sure user-declared virtual destructors always have the virtual keyword. The Clang style-check plugin will check for this soon. No functionality change: virtual is only added to destructors that are already implicitly virtual. Also fix a couple of in-line destructor definitions. BUG=83408 TEST=none Review URL: http://codereview.chromium.org/7064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_channel.h2
-rw-r--r--ipc/ipc_channel_posix.h2
-rw-r--r--ipc/ipc_message_macros.h9
-rw-r--r--ipc/ipc_sync_channel.h2
-rw-r--r--ipc/ipc_test_sink.h2
5 files changed, 8 insertions, 9 deletions
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 1550d49..6bfcded 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -119,7 +119,7 @@ class Channel : public Message::Sender {
Channel(const IPC::ChannelHandle &channel_handle, Mode mode,
Listener* listener);
- ~Channel();
+ virtual ~Channel();
// Connect the pipe. On the server side, this will initiate
// waiting for connections. On the client, it attempts to
diff --git a/ipc/ipc_channel_posix.h b/ipc/ipc_channel_posix.h
index ac914ba..652a29a 100644
--- a/ipc/ipc_channel_posix.h
+++ b/ipc/ipc_channel_posix.h
@@ -52,7 +52,7 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher {
// Mirror methods of Channel, see ipc_channel.h for description.
ChannelImpl(const IPC::ChannelHandle& channel_handle, Mode mode,
Listener* listener);
- ~ChannelImpl();
+ virtual ~ChannelImpl();
bool Connect();
void Close();
void set_listener(Listener* listener) { listener_ = listener; }
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index 87e9c20..34b5103 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -442,7 +442,7 @@
public: \
enum { ID = IPC_MESSAGE_ID() }; \
msg_class(IPC_TYPE_IN_##in_cnt in_list); \
- ~msg_class(); \
+ virtual ~msg_class(); \
static void Log(std::string* name, const Message* msg, std::string* l); \
};
@@ -453,7 +453,7 @@
enum { ID = IPC_MESSAGE_ID() }; \
msg_class(int32 routing_id IPC_COMMA_##in_cnt \
IPC_TYPE_IN_##in_cnt in_list); \
- ~msg_class(); \
+ virtual ~msg_class(); \
static void Log(std::string* name, const Message* msg, std::string* l); \
};
@@ -466,7 +466,7 @@
msg_class(IPC_TYPE_IN_##in_cnt in_list \
IPC_COMMA_AND_##in_cnt(IPC_COMMA_##out_cnt) \
IPC_TYPE_OUT_##out_cnt out_list); \
- ~msg_class(); \
+ virtual ~msg_class(); \
static void Log(std::string* name, const Message* msg, std::string* l); \
};
@@ -481,7 +481,7 @@
IPC_TYPE_IN_##in_cnt in_list \
IPC_COMMA_AND_##in_cnt(IPC_COMMA_##out_cnt) \
IPC_TYPE_OUT_##out_cnt out_list); \
- ~msg_class(); \
+ virtual ~msg_class(); \
static void Log(std::string* name, const Message* msg, std::string* l); \
};
@@ -777,4 +777,3 @@ LogFunctionMap g_log_function_mapping;
// XXX_messages.h files need not do so themselves. This makes the
// XXX_messages.h files easier to write.
#undef IPC_MESSAGE_START
-
diff --git a/ipc/ipc_sync_channel.h b/ipc/ipc_sync_channel.h
index 8cea5a8..e2d4c82 100644
--- a/ipc/ipc_sync_channel.h
+++ b/ipc/ipc_sync_channel.h
@@ -141,7 +141,7 @@ class SyncChannel : public ChannelProxy,
bool restrict_dispatch() const { return restrict_dispatch_; }
private:
- ~SyncContext();
+ virtual ~SyncContext();
// ChannelProxy methods that we override.
// Called on the listener thread.
diff --git a/ipc/ipc_test_sink.h b/ipc/ipc_test_sink.h
index c8c2114..ad1125a 100644
--- a/ipc/ipc_test_sink.h
+++ b/ipc/ipc_test_sink.h
@@ -74,7 +74,7 @@ class Message;
class TestSink : public Channel {
public:
TestSink();
- ~TestSink();
+ virtual ~TestSink();
// Interface in IPC::Channel. This copies the message to the sink and then
// deletes it.