diff options
author | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 00:48:15 +0000 |
---|---|---|
committer | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 00:48:15 +0000 |
commit | 4b4172299b3b74557ba20d3d8c87d811cf502f39 (patch) | |
tree | 99448b8838e18fefe7ab4b247d381c078a5bc83d | |
parent | 827ea2449764f84344a5e1d5c3b650f29cf2571f (diff) | |
download | chromium_src-4b4172299b3b74557ba20d3d8c87d811cf502f39.zip chromium_src-4b4172299b3b74557ba20d3d8c87d811cf502f39.tar.gz chromium_src-4b4172299b3b74557ba20d3d8c87d811cf502f39.tar.bz2 |
Revert "Const-ify RefCountedThreadSafe::AddRef and Release."
This reverts commit b7ce919957536ceb0cfac1709bc779fd086b6ce8.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63459 0039d316-1c4b-4281-b951-d872f2087c98
29 files changed, 53 insertions, 58 deletions
diff --git a/base/message_loop.h b/base/message_loop.h index 37e4b81..94e0096 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -146,7 +146,7 @@ class MessageLoop : public base::MessagePump::Delegate { // as the thread that calls PostDelayedTask(FROM_HERE, ), then T MUST inherit // from RefCountedThreadSafe<T>! template <class T> - void DeleteSoon(const tracked_objects::Location& from_here, const T* object) { + void DeleteSoon(const tracked_objects::Location& from_here, T* object) { PostNonNestableTask(from_here, new DeleteTask<T>(object)); } @@ -161,8 +161,7 @@ class MessageLoop : public base::MessagePump::Delegate { // PostDelayedTask(FROM_HERE, ), then T MUST inherit from // RefCountedThreadSafe<T>! template <class T> - void ReleaseSoon(const tracked_objects::Location& from_here, - const T* object) { + void ReleaseSoon(const tracked_objects::Location& from_here, T* object) { PostNonNestableTask(from_here, new ReleaseTask<T>(object)); } diff --git a/base/message_loop_proxy.cc b/base/message_loop_proxy.cc index a38db39..bc7088d 100644 --- a/base/message_loop_proxy.cc +++ b/base/message_loop_proxy.cc @@ -12,7 +12,7 @@ MessageLoopProxy::MessageLoopProxy() { MessageLoopProxy::~MessageLoopProxy() { } -void MessageLoopProxy::OnDestruct() const { +void MessageLoopProxy::OnDestruct() { delete this; } diff --git a/base/message_loop_proxy.h b/base/message_loop_proxy.h index 4d38155..5d6708e 100644 --- a/base/message_loop_proxy.h +++ b/base/message_loop_proxy.h @@ -64,11 +64,11 @@ class MessageLoopProxy // Called when the proxy is about to be deleted. Subclasses can override this // to provide deletion on specific threads. - virtual void OnDestruct() const; + virtual void OnDestruct(); }; struct MessageLoopProxyTraits { - static void Destruct(const MessageLoopProxy* proxy) { + static void Destruct(MessageLoopProxy* proxy) { proxy->OnDestruct(); } }; diff --git a/base/message_loop_proxy_impl.cc b/base/message_loop_proxy_impl.cc index 761cc71..983a406 100644 --- a/base/message_loop_proxy_impl.cc +++ b/base/message_loop_proxy_impl.cc @@ -71,7 +71,7 @@ bool MessageLoopProxyImpl::PostTaskHelper( return ret; } -void MessageLoopProxyImpl::OnDestruct() const { +void MessageLoopProxyImpl::OnDestruct() { bool delete_later = false; { AutoLock lock(message_loop_lock_); diff --git a/base/message_loop_proxy_impl.h b/base/message_loop_proxy_impl.h index 87ae70a..b93bb64 100644 --- a/base/message_loop_proxy_impl.h +++ b/base/message_loop_proxy_impl.h @@ -39,7 +39,7 @@ class MessageLoopProxyImpl : public MessageLoopProxy, protected: // Override OnDestruct so that we can delete the object on the target message // loop if it still exists. - virtual void OnDestruct() const; + virtual void OnDestruct(); private: MessageLoopProxyImpl(); @@ -50,7 +50,7 @@ class MessageLoopProxyImpl : public MessageLoopProxy, friend class MessageLoopProxy; // The lock that protects access to target_message_loop_. - mutable Lock message_loop_lock_; + Lock message_loop_lock_; MessageLoop* target_message_loop_; DISALLOW_COPY_AND_ASSIGN(MessageLoopProxyImpl); diff --git a/base/message_loop_proxy_impl_unittest.cc b/base/message_loop_proxy_impl_unittest.cc index 8d8ef4e..a3cb800 100644 --- a/base/message_loop_proxy_impl_unittest.cc +++ b/base/message_loop_proxy_impl_unittest.cc @@ -12,20 +12,20 @@ class MessageLoopProxyImplTest : public testing::Test { public: - void Release() const { + void Release() { AssertOnIOThread(); Quit(); } - void Quit() const { + void Quit() { loop_.PostTask(FROM_HERE, new MessageLoop::QuitTask); } - void AssertOnIOThread() const { + void AssertOnIOThread() { ASSERT_TRUE(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); } - void AssertOnFileThread() const { + void AssertOnFileThread() { ASSERT_TRUE(file_thread_->message_loop_proxy()->BelongsToCurrentThread()); } @@ -79,7 +79,7 @@ class MessageLoopProxyImplTest : public testing::Test { scoped_ptr<base::Thread> file_thread_; private: - mutable MessageLoop loop_; + MessageLoop loop_; }; diff --git a/base/ref_counted.h b/base/ref_counted.h index 9c84efa..2cc4029 100644 --- a/base/ref_counted.h +++ b/base/ref_counted.h @@ -106,7 +106,7 @@ template <class T, typename Traits> class RefCountedThreadSafe; // count reaches 0. Overload to delete it on a different thread etc. template<typename T> struct DefaultRefCountedThreadSafeTraits { - static void Destruct(const T* x) { + static void Destruct(T* x) { // Delete through RefCountedThreadSafe to make child classes only need to be // friend with RefCountedThreadSafe instead of this struct, which is an // implementation detail. @@ -133,19 +133,19 @@ class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase { RefCountedThreadSafe() { } ~RefCountedThreadSafe() { } - void AddRef() const { + void AddRef() { subtle::RefCountedThreadSafeBase::AddRef(); } - void Release() const { + void Release() { if (subtle::RefCountedThreadSafeBase::Release()) { - Traits::Destruct(static_cast<const T*>(this)); + Traits::Destruct(static_cast<T*>(this)); } } private: friend struct DefaultRefCountedThreadSafeTraits<T>; - static void DeleteInternal(const T* x) { delete x; } + static void DeleteInternal(T* x) { delete x; } DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe); }; diff --git a/base/task.h b/base/task.h index 28d15fc..e6ac33c 100644 --- a/base/task.h +++ b/base/task.h @@ -180,7 +180,7 @@ class ScopedRunnableMethodFactory { template<class T> class DeleteTask : public CancelableTask { public: - explicit DeleteTask(const T* obj) : obj_(obj) { + explicit DeleteTask(T* obj) : obj_(obj) { } virtual void Run() { delete obj_; @@ -190,14 +190,14 @@ class DeleteTask : public CancelableTask { } private: - const T* obj_; + T* obj_; }; // Task to Release() an object template<class T> class ReleaseTask : public CancelableTask { public: - explicit ReleaseTask(const T* obj) : obj_(obj) { + explicit ReleaseTask(T* obj) : obj_(obj) { } virtual void Run() { if (obj_) @@ -208,7 +208,7 @@ class ReleaseTask : public CancelableTask { } private: - const T* obj_; + T* obj_; }; // RunnableMethodTraits -------------------------------------------------------- diff --git a/chrome/browser/browser_thread.h b/chrome/browser/browser_thread.h index f6a022e..c034851 100644 --- a/chrome/browser/browser_thread.h +++ b/chrome/browser/browser_thread.h @@ -109,7 +109,7 @@ class BrowserThread : public base::Thread { template <class T> static bool DeleteSoon(ID identifier, const tracked_objects::Location& from_here, - const T* object) { + T* object) { return PostNonNestableTask( identifier, from_here, new DeleteTask<T>(object)); } @@ -117,7 +117,7 @@ class BrowserThread : public base::Thread { template <class T> static bool ReleaseSoon(ID identifier, const tracked_objects::Location& from_here, - const T* object) { + T* object) { return PostNonNestableTask( identifier, from_here, new ReleaseTask<T>(object)); } @@ -154,7 +154,7 @@ class BrowserThread : public base::Thread { template<ID thread> struct DeleteOnThread { template<typename T> - static void Destruct(const T* x) { + static void Destruct(T* x) { if (CurrentlyOn(thread)) { delete x; } else { diff --git a/chrome/browser/browser_thread_unittest.cc b/chrome/browser/browser_thread_unittest.cc index 948709a..d2c19d8 100644 --- a/chrome/browser/browser_thread_unittest.cc +++ b/chrome/browser/browser_thread_unittest.cc @@ -11,7 +11,7 @@ class BrowserThreadTest : public testing::Test { public: - void Release() const { + void Release() { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); loop_.PostTask(FROM_HERE, new MessageLoop::QuitTask); } @@ -77,9 +77,7 @@ class BrowserThreadTest : public testing::Test { private: scoped_ptr<BrowserThread> ui_thread_; scoped_ptr<BrowserThread> file_thread_; - // It's kind of ugly to make this mutable - solely so we can post the Quit - // Task from Release(). This should be fixed. - mutable MessageLoop loop_; + MessageLoop loop_; }; TEST_F(BrowserThreadTest, PostTask) { diff --git a/chrome/browser/chrome_plugin_unittest.cc b/chrome/browser/chrome_plugin_unittest.cc index a7eee5b..38b4bd5 100644 --- a/chrome/browser/chrome_plugin_unittest.cc +++ b/chrome/browser/chrome_plugin_unittest.cc @@ -33,7 +33,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter { context_ = new TestURLRequestContext(); return context_; } - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() { return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); } diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index 795a087..cc1fe93 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -608,7 +608,7 @@ net::CookieStore* ChromeURLRequestContextGetter::GetCookieStore() { } scoped_refptr<base::MessageLoopProxy> -ChromeURLRequestContextGetter::GetIOMessageLoopProxy() const { +ChromeURLRequestContextGetter::GetIOMessageLoopProxy() { return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); } diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index 43b1b21..a580282 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -240,7 +240,7 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, // URLRequestContextGetter implementation. virtual URLRequestContext* GetURLRequestContext(); virtual net::CookieStore* GetCookieStore(); - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy(); // Convenience overload of GetURLRequestContext() that returns a // ChromeURLRequestContext* rather than a URLRequestContext*. diff --git a/chrome/browser/renderer_host/pepper_file_message_filter.cc b/chrome/browser/renderer_host/pepper_file_message_filter.cc index cbd09af..e7b331b 100644 --- a/chrome/browser/renderer_host/pepper_file_message_filter.cc +++ b/chrome/browser/renderer_host/pepper_file_message_filter.cc @@ -104,7 +104,7 @@ void PepperFileMessageFilter::OnMessageReceivedFileThread( } } -void PepperFileMessageFilter::OnDestruct() const { +void PepperFileMessageFilter::OnDestruct() { BrowserThread::DeleteOnIOThread::Destruct(this); } diff --git a/chrome/browser/renderer_host/pepper_file_message_filter.h b/chrome/browser/renderer_host/pepper_file_message_filter.h index 003d258..37e57f6 100644 --- a/chrome/browser/renderer_host/pepper_file_message_filter.h +++ b/chrome/browser/renderer_host/pepper_file_message_filter.h @@ -37,7 +37,7 @@ class PepperFileMessageFilter : public IPC::ChannelProxy::MessageFilter { virtual void OnChannelError(); virtual void OnChannelClosing(); virtual bool OnMessageReceived(const IPC::Message& message); - virtual void OnDestruct() const; + virtual void OnDestruct(); // Called from the FILE thread. void Send(IPC::Message* message); diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 5b6d837..cea0c94 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -532,7 +532,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { return handled; } -void ResourceMessageFilter::OnDestruct() const { +void ResourceMessageFilter::OnDestruct() { BrowserThread::DeleteOnIOThread::Destruct(this); } diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index a2c202c..97d3992 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -107,7 +107,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, virtual void OnChannelError(); virtual void OnChannelClosing(); virtual bool OnMessageReceived(const IPC::Message& message); - virtual void OnDestruct() const; + virtual void OnDestruct(); // ResourceDispatcherHost::Receiver methods: virtual bool Send(IPC::Message* message); diff --git a/chrome/browser/sync/glue/http_bridge.cc b/chrome/browser/sync/glue/http_bridge.cc index 044cc75..3adaaf0 100644 --- a/chrome/browser/sync/glue/http_bridge.cc +++ b/chrome/browser/sync/glue/http_bridge.cc @@ -44,7 +44,7 @@ URLRequestContext* HttpBridge::RequestContextGetter::GetURLRequestContext() { } scoped_refptr<base::MessageLoopProxy> -HttpBridge::RequestContextGetter::GetIOMessageLoopProxy() const { +HttpBridge::RequestContextGetter::GetIOMessageLoopProxy() { return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); } diff --git a/chrome/browser/sync/glue/http_bridge.h b/chrome/browser/sync/glue/http_bridge.h index 5b9d4b2..1951ce5 100644 --- a/chrome/browser/sync/glue/http_bridge.h +++ b/chrome/browser/sync/glue/http_bridge.h @@ -85,7 +85,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, // URLRequestContextGetter implementation. virtual URLRequestContext* GetURLRequestContext(); - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy(); private: ~RequestContextGetter() {} diff --git a/chrome/browser/sync/glue/http_bridge_unittest.cc b/chrome/browser/sync/glue/http_bridge_unittest.cc index eac7c32..dc4948d 100644 --- a/chrome/browser/sync/glue/http_bridge_unittest.cc +++ b/chrome/browser/sync/glue/http_bridge_unittest.cc @@ -26,7 +26,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter { context_ = new TestURLRequestContext; return context_; } - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() { return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); } diff --git a/chrome/common/net/url_fetcher_unittest.cc b/chrome/common/net/url_fetcher_unittest.cc index 512f38b..3fc8469 100644 --- a/chrome/common/net/url_fetcher_unittest.cc +++ b/chrome/common/net/url_fetcher_unittest.cc @@ -34,7 +34,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter { context_ = new TestURLRequestContext(); return context_; } - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() { return io_message_loop_proxy_; } @@ -199,7 +199,7 @@ class CancelTestURLRequestContextGetter : public URLRequestContextGetter { } return context_; } - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() { return io_message_loop_proxy_; } void WaitForContextCreation() { diff --git a/chrome/common/net/url_request_context_getter.cc b/chrome/common/net/url_request_context_getter.cc index 08b5368..57feb0e 100644 --- a/chrome/common/net/url_request_context_getter.cc +++ b/chrome/common/net/url_request_context_getter.cc @@ -14,7 +14,7 @@ URLRequestContextGetter::URLRequestContextGetter() : is_main_(false) {} URLRequestContextGetter::~URLRequestContextGetter() {} -void URLRequestContextGetter::OnDestruct() const { +void URLRequestContextGetter::OnDestruct() { scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy = GetIOMessageLoopProxy(); DCHECK(io_message_loop_proxy); diff --git a/chrome/common/net/url_request_context_getter.h b/chrome/common/net/url_request_context_getter.h index ade5e1a..2b6ea82 100644 --- a/chrome/common/net/url_request_context_getter.h +++ b/chrome/common/net/url_request_context_getter.h @@ -33,8 +33,7 @@ class URLRequestContextGetter // Returns a MessageLoopProxy corresponding to the thread on which the // request IO happens (the thread on which the returned URLRequestContext // may be used). - virtual scoped_refptr<base::MessageLoopProxy> - GetIOMessageLoopProxy() const = 0; + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() = 0; // Controls whether or not the URLRequestContextGetter considers itself to be // the the "main" URLRequestContextGetter. Note that each Profile will have a @@ -45,7 +44,7 @@ class URLRequestContextGetter void set_is_main(bool is_main) { is_main_ = is_main; } protected: - friend class DeleteTask<const URLRequestContextGetter>; + friend class DeleteTask<URLRequestContextGetter>; friend struct URLRequestContextGetterTraits; URLRequestContextGetter(); @@ -56,7 +55,7 @@ class URLRequestContextGetter private: // OnDestruct is meant to ensure deletion on the thread on which the request // IO happens. - void OnDestruct() const; + void OnDestruct(); // Indicates whether or not this is the default URLRequestContextGetter for // the main Profile. @@ -64,7 +63,7 @@ class URLRequestContextGetter }; struct URLRequestContextGetterTraits { - static void Destruct(const URLRequestContextGetter* context_getter) { + static void Destruct(URLRequestContextGetter* context_getter) { context_getter->OnDestruct(); } }; diff --git a/chrome/service/net/service_url_request_context.cc b/chrome/service/net/service_url_request_context.cc index 8e5ae02..3f264a4 100644 --- a/chrome/service/net/service_url_request_context.cc +++ b/chrome/service/net/service_url_request_context.cc @@ -64,15 +64,14 @@ ServiceURLRequestContextGetter::ServiceURLRequestContextGetter() g_service_process->io_thread()->message_loop_proxy()) { } -URLRequestContext* -ServiceURLRequestContextGetter::GetURLRequestContext() { +URLRequestContext* ServiceURLRequestContextGetter::GetURLRequestContext() { if (!url_request_context_) url_request_context_ = new ServiceURLRequestContext(); return url_request_context_; } scoped_refptr<base::MessageLoopProxy> -ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { +ServiceURLRequestContextGetter::GetIOMessageLoopProxy() { return io_message_loop_proxy_; } diff --git a/chrome/service/net/service_url_request_context.h b/chrome/service/net/service_url_request_context.h index 46a8b2a..379371f 100644 --- a/chrome/service/net/service_url_request_context.h +++ b/chrome/service/net/service_url_request_context.h @@ -59,7 +59,7 @@ class ServiceURLRequestContextGetter : public URLRequestContextGetter { ServiceURLRequestContextGetter(); virtual URLRequestContext* GetURLRequestContext(); - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy(); void set_user_agent(const std::string& ua) { user_agent_ = ua; diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc index 829fcc9..4de6143 100644 --- a/chrome/test/testing_profile.cc +++ b/chrome/test/testing_profile.cc @@ -122,7 +122,7 @@ class TestURLRequestContextGetter : public URLRequestContextGetter { context_ = new TestURLRequestContext(); return context_.get(); } - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() { return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); } @@ -147,7 +147,7 @@ class TestExtensionURLRequestContextGetter : public URLRequestContextGetter { context_ = new TestExtensionURLRequestContext(); return context_.get(); } - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() { return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); } diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc index b49e52d..461862f 100644 --- a/chrome_frame/metrics_service.cc +++ b/chrome_frame/metrics_service.cc @@ -210,7 +210,7 @@ class ChromeFrameUploadRequestContextGetter : public URLRequestContextGetter { return context_; } - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() { if (!io_message_loop_proxy_.get()) { io_message_loop_proxy_ = base::MessageLoopProxy::CreateForCurrentThread(); } diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc index dcc66aad..feca4eb 100644 --- a/ipc/ipc_channel_proxy.cc +++ b/ipc/ipc_channel_proxy.cc @@ -54,7 +54,7 @@ bool ChannelProxy::MessageFilter::OnMessageReceived(const Message& message) { return false; } -void ChannelProxy::MessageFilter::OnDestruct() const { +void ChannelProxy::MessageFilter::OnDestruct() { delete this; } diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h index 53a39b4..1ce9986 100644 --- a/ipc/ipc_channel_proxy.h +++ b/ipc/ipc_channel_proxy.h @@ -87,11 +87,11 @@ class ChannelProxy : public Message::Sender { // Called when the message filter is about to be deleted. This gives // derived classes the option of controlling which thread they're deleted // on etc. - virtual void OnDestruct() const; + virtual void OnDestruct(); }; struct MessageFilterTraits { - static void Destruct(const MessageFilter* filter) { + static void Destruct(MessageFilter* filter) { filter->OnDestruct(); } }; |