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

Unified Diff: content/browser/browser_thread_impl.cc

Issue 8427007: Thread::Stop() must be called before any subclass's destructor completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest version as trybot-ted Created 9 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 | « chrome_frame/utils.h ('k') | content/test/test_browser_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_thread_impl.cc
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc
index ef5be1b0c045ce544e8cb531eb77e63322b29d6a..4b85b616cac113a76d6efae2fa73259e5f64ea60 100644
--- a/content/browser/browser_thread_impl.cc
+++ b/content/browser/browser_thread_impl.cc
@@ -43,11 +43,6 @@ BrowserThreadImpl::BrowserThreadImpl(BrowserThread::ID identifier,
}
BrowserThreadImpl::~BrowserThreadImpl() {
- // Subclasses of base::Thread() (or at least the most-derived
- // subclass) must call Stop() in their destructor, otherwise the
- // vtable for the object can change while the thread's message loop
- // is still running, and it uses the object's vtable (it calls the
- // virtual method Run).
Stop();
}
@@ -139,6 +134,7 @@ DeprecatedBrowserThread::DeprecatedBrowserThread(BrowserThread::ID identifier,
: BrowserThread(identifier, message_loop) {
}
DeprecatedBrowserThread::~DeprecatedBrowserThread() {
+ Stop();
}
// An implementation of MessageLoopProxy to be used in conjunction
« no previous file with comments | « chrome_frame/utils.h ('k') | content/test/test_browser_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698