libcef:
- 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:
parent
431fc0ac73
commit
bd0c16ae31
|
@ -180,6 +180,9 @@ private:
|
||||||
|
|
||||||
void Resolve(const GURL& url) {
|
void Resolve(const GURL& url) {
|
||||||
AutoLock locked(lock_);
|
AutoLock locked(lock_);
|
||||||
|
if (!owner_ || !owner_loop_)
|
||||||
|
return;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// safe to perform long operation here
|
// safe to perform long operation here
|
||||||
CefRefPtr<CefRequest> req(CefRequest::CreateRequest());
|
CefRefPtr<CefRequest> req(CefRequest::CreateRequest());
|
||||||
|
@ -207,9 +210,8 @@ private:
|
||||||
void Cancel() {
|
void Cancel() {
|
||||||
owner_->handler_->Cancel();
|
owner_->handler_->Cancel();
|
||||||
|
|
||||||
owner_ = NULL;
|
|
||||||
|
|
||||||
AutoLock locked(lock_);
|
AutoLock locked(lock_);
|
||||||
|
owner_ = NULL;
|
||||||
owner_loop_ = NULL;
|
owner_loop_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue