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

Unified Diff: chrome/browser/extensions/crx_installer.cc

Issue 1080453002: Always destroy CrxInstaller on the UI Thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Less plumbing. More comments Created 5 years, 8 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 | « chrome/browser/extensions/crx_installer.h ('k') | extensions/browser/sandboxed_unpacker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index c76a45d332cba783425668b9cc409fd47409a885..be392bb8383e5219fb00287a145a5785f3745690 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -163,11 +163,11 @@ CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> service_weak,
}
CrxInstaller::~CrxInstaller() {
- // Make sure the UI is deleted on the ui thread.
- if (client_) {
- BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, client_);
- client_ = NULL;
- }
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ // Ensure |client_| and |install_checker_| data members are destroyed on the
+ // UI thread. The |client_| dialog has a weak reference as |this| is its
+ // delegate, and |install_checker_| owns WeakPtrs, so must be destroyed on the
+ // same thread that created it.
}
void CrxInstaller::InstallCrx(const base::FilePath& source_file) {
« no previous file with comments | « chrome/browser/extensions/crx_installer.h ('k') | extensions/browser/sandboxed_unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698