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

Unified Diff: chrome/browser/chrome_thread.cc

Issue 363010: Stop each ChromeThread before nulling out the entry in chrome_threads_. This... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_thread.cc
===================================================================
--- chrome/browser/chrome_thread.cc (revision 30973)
+++ chrome/browser/chrome_thread.cc (working copy)
@@ -41,6 +41,11 @@
}
ChromeThread::~ChromeThread() {
+ // Stop the thread here, instead of the parent's class destructor. This is so
+ // that if there are pending tasks that run, code that checks that it's on the
+ // correct ChromeThread succeeds.
+ Stop();
+
AutoLock lock(lock_);
chrome_threads_[identifier_] = NULL;
#ifndef NDEBUG
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698