From 1e2917814446b821d4c326282d819ddd318ff175 Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Fri, 8 Oct 2010 00:41:30 +0000 Subject: Fix instances of passing raw pointers to RefCounted objects in tasks. Some of these manually handled it correctly by using AddRef()/Release() pairs. I switched them to make_scoped_refptr() to be more consistent. This also makes them cleanup properly on MessageLoop shutdown if we start deleting tasks. BUG=28083 TEST=builds Review URL: http://codereview.chromium.org/3581008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61899 0039d316-1c4b-4281-b951-d872f2087c98 --- .../in_process_webkit/dom_storage_dispatcher_host.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'chrome/browser/in_process_webkit') diff --git a/chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc b/chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc index 17e99c4..6dc08d0 100644 --- a/chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc +++ b/chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc @@ -151,9 +151,17 @@ void DOMStorageDispatcherHost::OnStorageAreaId(int64 namespace_id, DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); ChromeURLRequestContext* url_request_context = resource_message_filter_->GetRequestContextForURL(GURL(origin)); - ChromeThread::PostTask(ChromeThread::WEBKIT, FROM_HERE, NewRunnableMethod( - this, &DOMStorageDispatcherHost::OnStorageAreaIdWebKit, namespace_id, - origin, reply_msg, url_request_context->host_content_settings_map())); + ChromeThread::PostTask( + ChromeThread::WEBKIT, + FROM_HERE, + NewRunnableMethod( + this, + &DOMStorageDispatcherHost::OnStorageAreaIdWebKit, + namespace_id, + origin, + reply_msg, + make_scoped_refptr( + url_request_context->host_content_settings_map()))); } void DOMStorageDispatcherHost::OnStorageAreaIdWebKit( -- cgit v1.1