diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-04 02:04:19 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-04 02:04:19 +0000 |
commit | c75da645edbe00944e180a3868a7da459d9852ca (patch) | |
tree | ce8a96e6f7bb1c81fae157c083af67f296682ddb /chrome/browser/profile_manager.cc | |
parent | a6c3c9aabb69c72ed6409686680ee0bb68f23108 (diff) | |
download | chromium_src-c75da645edbe00944e180a3868a7da459d9852ca.zip chromium_src-c75da645edbe00944e180a3868a7da459d9852ca.tar.gz chromium_src-c75da645edbe00944e180a3868a7da459d9852ca.tar.bz2 |
Add debug info to track a crash when sleeping.
BUG=31723
TEST=none
Review URL: http://codereview.chromium.org/560039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile_manager.cc')
-rw-r--r-- | chrome/browser/profile_manager.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/chrome/browser/profile_manager.cc b/chrome/browser/profile_manager.cc index f8cb344..209c2d2 100644 --- a/chrome/browser/profile_manager.cc +++ b/chrome/browser/profile_manager.cc @@ -168,10 +168,24 @@ void ProfileManager::OnResume() { } } +#if defined(OS_WIN) +#pragma optimize("", off) +#pragma warning(disable:4748) +#endif void ProfileManager::SuspendProfile(Profile* profile) { - DCHECK(profile); + CHECK(profile); DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); + // TODO(rvargas): remove this after finding the cause for bug 31723. + URLRequestJob* job_list[50] = { NULL }; + int count = 0; + for (URLRequestJobTracker::JobIterator i = g_url_request_job_tracker.begin(); + i != g_url_request_job_tracker.end(); ++i) { + if (count < 50) + job_list[count] = *i; + count++; + } + for (URLRequestJobTracker::JobIterator i = g_url_request_job_tracker.begin(); i != g_url_request_job_tracker.end(); ++i) (*i)->Kill(); @@ -179,6 +193,10 @@ void ProfileManager::SuspendProfile(Profile* profile) { profile->GetRequestContext()->GetURLRequestContext()-> http_transaction_factory()->Suspend(true); } +#if defined(OS_WIN) +#pragma warning(default:4748) +#pragma optimize("", on) +#endif void ProfileManager::ResumeProfile(Profile* profile) { DCHECK(profile); |