summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-10 15:21:52 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-10 15:21:52 +0000
commit262e8693478039b0d2e786938cffc476ee102a0a (patch)
treeb0275f0d0aa8520003a30c80d985ecc1da514642
parent5a3cf34b090cbb34ab8a938c0b5694470de88827 (diff)
downloadchromium_src-262e8693478039b0d2e786938cffc476ee102a0a.zip
chromium_src-262e8693478039b0d2e786938cffc476ee102a0a.tar.gz
chromium_src-262e8693478039b0d2e786938cffc476ee102a0a.tar.bz2
Destroy DOMStorageMessageFilter on the IO thread.
BUG=72424 TEST=no DCHECK, see bug Review URL: http://codereview.chromium.org/6460039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74431 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/in_process_webkit/dom_storage_message_filter.cc4
-rw-r--r--chrome/browser/in_process_webkit/dom_storage_message_filter.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/in_process_webkit/dom_storage_message_filter.cc b/chrome/browser/in_process_webkit/dom_storage_message_filter.cc
index c77f324..25407d3 100644
--- a/chrome/browser/in_process_webkit/dom_storage_message_filter.cc
+++ b/chrome/browser/in_process_webkit/dom_storage_message_filter.cc
@@ -102,6 +102,10 @@ bool DOMStorageMessageFilter::OnMessageReceived(const IPC::Message& message,
return handled;
}
+void DOMStorageMessageFilter::OnDestruct() {
+ BrowserThread::DeleteOnIOThread::Destruct(this);
+}
+
void DOMStorageMessageFilter::OverrideThreadForMessage(
const IPC::Message& message,
BrowserThread::ID* thread) {
diff --git a/chrome/browser/in_process_webkit/dom_storage_message_filter.h b/chrome/browser/in_process_webkit/dom_storage_message_filter.h
index eea02d0..4d55110 100644
--- a/chrome/browser/in_process_webkit/dom_storage_message_filter.h
+++ b/chrome/browser/in_process_webkit/dom_storage_message_filter.h
@@ -35,6 +35,7 @@ class DOMStorageMessageFilter : public BrowserMessageFilter {
BrowserThread::ID* thread);
virtual bool OnMessageReceived(const IPC::Message& message,
bool* message_was_ok);
+ virtual void OnDestruct();
// Only call on the WebKit thread.
static void DispatchStorageEvent(const NullableString16& key,
@@ -42,7 +43,8 @@ class DOMStorageMessageFilter : public BrowserMessageFilter {
const string16& origin, const GURL& url, bool is_local_storage);
private:
- friend class base::RefCountedThreadSafe<DOMStorageMessageFilter>;
+ friend class BrowserThread;
+ friend class DeleteTask<DOMStorageMessageFilter>;
~DOMStorageMessageFilter();
// Message Handlers.