From 8172ee73e82a7a1ce4b61415e44ba95cbe3eb5b1 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 9 Aug 2013 17:41:47 +0200 Subject: Delete the ResourceContextQt on the IO thread. This mimicks the Shell's behavior to avoid an assert. Change-Id: I31fdb4ff9c1ee9a359db84978da313489e93e30a Reviewed-by: Zeno Albisser --- lib/browser_context_qt.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/browser_context_qt.h b/lib/browser_context_qt.h index 065fb203f..8ba01779a 100644 --- a/lib/browser_context_qt.h +++ b/lib/browser_context_qt.h @@ -49,6 +49,7 @@ #include "shared/shared_globals.h" #include "base/time/time.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/resource_context.h" #include "content/public/browser/storage_partition.h" @@ -76,7 +77,11 @@ public: downloadManagerDelegate.reset(new DownloadManagerDelegateQt); } - virtual ~BrowserContextQt() Q_DECL_OVERRIDE {} + virtual ~BrowserContextQt() Q_DECL_OVERRIDE + { + if (resourceContext) + content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, resourceContext.release()); + } virtual base::FilePath GetPath() const Q_DECL_OVERRIDE { -- cgit v1.2.3