Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1166)

Unified Diff: content/browser/loader/resource_message_filter.cc

Issue 1970693002: Use mojo for Chrome Loading, Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/resource_message_filter.h ('k') | content/browser/loader/test_url_loader_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_message_filter.cc
diff --git a/content/browser/loader/resource_message_filter.cc b/content/browser/loader/resource_message_filter.cc
index eb1993b59568c008f73f741a8e158a7613d235a0..b14afa1b422f2602d44f3b393d8e08844a75e0a3 100644
--- a/content/browser/loader/resource_message_filter.cc
+++ b/content/browser/loader/resource_message_filter.cc
@@ -49,6 +49,12 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& message) {
return ResourceDispatcherHostImpl::Get()->OnMessageReceived(message, this);
}
+void ResourceMessageFilter::OnDestruct() const {
+ // Destroy the filter on the IO thread since that's where its weak pointers
+ // are being used.
+ BrowserThread::DeleteOnIOThread::Destruct(this);
+}
+
void ResourceMessageFilter::GetContexts(
ResourceType resource_type,
ResourceContext** resource_context,
@@ -64,6 +70,7 @@ const HostZoomMap* ResourceMessageFilter::GetHostZoomMap() const {
}
base::WeakPtr<ResourceMessageFilter> ResourceMessageFilter::GetWeakPtr() {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
return weak_ptr_factory_.GetWeakPtr();
}
« no previous file with comments | « content/browser/loader/resource_message_filter.h ('k') | content/browser/loader/test_url_loader_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698