Commit 66bf19eb authored by cpu@chromium.org's avatar cpu@chromium.org

Remove dcheck at CrxInstaller teardown

dchecks because it tries to post a task to the file thread, but chrome is shutting down so post fails

This makes startup tests flaky.

BUG=none
TEST=startup tests do not crash, ask nsylvain.

Review URL: http://codereview.chromium.org/8438017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108213 0039d316-1c4b-4281-b951-d872f2087c98
parent aeecb377
......@@ -135,23 +135,17 @@ CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak,
CrxInstaller::~CrxInstaller() {
// Delete the temp directory and crx file as necessary. Note that the
// destructor might be called on any thread, so we post a task to the file
// thread to make sure the delete happens there.
// thread to make sure the delete happens there. This is a best effort
// operation since the browser can be shutting down so there might not
// be a file thread to post to.
if (!temp_dir_.value().empty()) {
if (!BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(
&extension_file_util::DeleteFile, temp_dir_, true)))
NOTREACHED();
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&extension_file_util::DeleteFile, temp_dir_, true));
}
if (delete_source_) {
if (!BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(
&extension_file_util::DeleteFile, source_file_, false)))
NOTREACHED();
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&extension_file_util::DeleteFile, source_file_, false));
}
// Make sure the UI is deleted on the ui thread.
BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, client_);
client_ = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment