- Fix race condition in CefUrlRequestJob::AsyncResolver. (Issue #65, fix by heshiming)

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@69 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2010-02-03 18:56:17 +00:00
parent 431fc0ac73
commit bd0c16ae31
1 changed files with 4 additions and 2 deletions

View File

@ -180,6 +180,9 @@ private:
void Resolve(const GURL& url) {
AutoLock locked(lock_);
if (!owner_ || !owner_loop_)
return;
//////////////////////////////////////////////////////////////////////////
// safe to perform long operation here
CefRefPtr<CefRequest> req(CefRequest::CreateRequest());
@ -207,9 +210,8 @@ private:
void Cancel() {
owner_->handler_->Cancel();
owner_ = NULL;
AutoLock locked(lock_);
owner_ = NULL;
owner_loop_ = NULL;
}