summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-10 22:36:57 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-10 22:36:57 +0000
commita79e6f1695c6ec8685b8535494e1e395f1972957 (patch)
tree29ea628a578d51800cb44ad162d71c400998aaad
parenta42f2e2d7447f9ae1a65f7171c29b75bd3d14826 (diff)
downloadchromium_src-a79e6f1695c6ec8685b8535494e1e395f1972957.zip
chromium_src-a79e6f1695c6ec8685b8535494e1e395f1972957.tar.gz
chromium_src-a79e6f1695c6ec8685b8535494e1e395f1972957.tar.bz2
Fix a DCHECK which fires in single process mode indicating that the in proc renderer thread (RendererMainThread)
was not quit properly. We initially set this tls flag to true in RendererMainThread::Init to get around this. However there are other threads like the compositor, etc which are started from this thread which set this tls flag to false. Fix is to set the flag to true in the Cleanup function of this thread. This basically caused the debug runs of the chrome frame net tests suite to fail consistently on the try servers. Review URL: http://codereview.chromium.org/8216024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104807 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/renderer_host/browser_render_process_host.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/content/browser/renderer_host/browser_render_process_host.cc b/content/browser/renderer_host/browser_render_process_host.cc
index 55c71e1..f3d21a8 100644
--- a/content/browser/renderer_host/browser_render_process_host.cc
+++ b/content/browser/renderer_host/browser_render_process_host.cc
@@ -121,12 +121,6 @@ class RendererMainThread : public base::Thread {
render_process_ = new RenderProcessImpl();
render_process_->set_main_thread(new RenderThreadImpl(channel_id_));
- // It's a little lame to manually set this flag. But the single process
- // RendererThread will receive the WM_QUIT. We don't need to assert on
- // this thread, so just force the flag manually.
- // If we want to avoid this, we could create the InProcRendererThread
- // directly with _beginthreadex() rather than using the Thread class.
- base::Thread::SetThreadWasQuitProperly(true);
}
virtual void CleanUp() {
@@ -135,6 +129,16 @@ class RendererMainThread : public base::Thread {
#if defined(OS_WIN)
CoUninitialize();
#endif
+ // It's a little lame to manually set this flag. But the single process
+ // RendererThread will receive the WM_QUIT. We don't need to assert on
+ // this thread, so just force the flag manually.
+ // If we want to avoid this, we could create the InProcRendererThread
+ // directly with _beginthreadex() rather than using the Thread class.
+ // We used to set this flag in the Init function above. However there
+ // other threads like WebThread which are created by this thread
+ // which resets this flag. Please see Thread::StartWithOptions. Setting
+ // this flag to true in Cleanup works around these problems.
+ base::Thread::SetThreadWasQuitProperly(true);
}
private: