Commit cdca196d authored by ananta@chromium.org's avatar ananta@chromium.org

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
parent bea15100
...@@ -1261,6 +1261,8 @@ void UrlmonUrlRequestManager::StopAll() { ...@@ -1261,6 +1261,8 @@ void UrlmonUrlRequestManager::StopAll() {
NewRunnableMethod( NewRunnableMethod(
this, &UrlmonUrlRequestManager::StopAllRequestsHelper, this, &UrlmonUrlRequestManager::StopAllRequestsHelper,
&background_request_map_, &background_resource_map_lock_)); &background_request_map_, &background_resource_map_lock_));
background_thread_->Stop();
background_thread_.reset();
} }
} }
...@@ -1374,8 +1376,6 @@ UrlmonUrlRequestManager::UrlmonUrlRequestManager() ...@@ -1374,8 +1376,6 @@ UrlmonUrlRequestManager::UrlmonUrlRequestManager()
UrlmonUrlRequestManager::~UrlmonUrlRequestManager() { UrlmonUrlRequestManager::~UrlmonUrlRequestManager() {
StopAll(); StopAll();
if (background_worker_thread_enabled_)
background_thread_->Stop();
} }
void UrlmonUrlRequestManager::AddPrivacyDataForUrl( void UrlmonUrlRequestManager::AddPrivacyDataForUrl(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment