diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 21:07:33 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 21:07:33 +0000 |
commit | cdca196df8e8f085cf8194b434d854b78d189ec5 (patch) | |
tree | 6f0d9c26db777de225877ba59e6ecccde94a0a07 /chrome_frame/urlmon_url_request.cc | |
parent | bea151001c80ddcaefbca6181c4d11592cd7eaab (diff) | |
download | chromium_src-cdca196df8e8f085cf8194b434d854b78d189ec5.zip chromium_src-cdca196df8e8f085cf8194b434d854b78d189ec5.tar.gz chromium_src-cdca196df8e8f085cf8194b434d854b78d189ec5.tar.bz2 |
Relanding this.
Fix a ChromeFrame crash which occurs in the background worker thread while
dereferencing a NULL automation client.
This crash occurs when the active document is in the process of shutting down
while there are active background
requests still pending.
Fix is to ensure that the background thread has been stopped before returning
from the UrlmonUrlRequestManager::StopAll
function which gets called during CF shutdown.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=102393
BUG=102393
TBR=robertshield
Review URL: http://codereview.chromium.org/8384019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_url_request.cc')
-rw-r--r-- | chrome_frame/urlmon_url_request.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index 9bade03..ea75ccf 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -1261,6 +1261,8 @@ void UrlmonUrlRequestManager::StopAll() { NewRunnableMethod( this, &UrlmonUrlRequestManager::StopAllRequestsHelper, &background_request_map_, &background_resource_map_lock_)); + background_thread_->Stop(); + background_thread_.reset(); } } @@ -1374,8 +1376,6 @@ UrlmonUrlRequestManager::UrlmonUrlRequestManager() UrlmonUrlRequestManager::~UrlmonUrlRequestManager() { StopAll(); - if (background_worker_thread_enabled_) - background_thread_->Stop(); } void UrlmonUrlRequestManager::AddPrivacyDataForUrl( |