diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-09 17:41:47 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-12 12:25:03 +0200 |
commit | 8172ee73e82a7a1ce4b61415e44ba95cbe3eb5b1 (patch) | |
tree | abe410310fd033f70f4da9ecbf54368a6e0d25ba /lib/browser_context_qt.h | |
parent | e5531f4cf93cef156deb7d4b290df9620aafb322 (diff) |
Delete the ResourceContextQt on the IO thread.
This mimicks the Shell's behavior to avoid an assert.
Change-Id: I31fdb4ff9c1ee9a359db84978da313489e93e30a
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'lib/browser_context_qt.h')
-rw-r--r-- | lib/browser_context_qt.h | 7 |
1 files changed, 6 insertions, 1 deletions
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 { |