diff options
author | laforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-30 14:37:13 +0000 |
---|---|---|
committer | laforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-30 14:37:13 +0000 |
commit | d64fe51939b5126b7610d657f9e9e3ac1fb16c92 (patch) | |
tree | afdeb45fb606ef78a2ee56ed3993b1341b0722a6 | |
parent | 4b8446c210cab35470edb71b6a523bb76ee3d90e (diff) | |
download | chromium_src-d64fe51939b5126b7610d657f9e9e3ac1fb16c92.zip chromium_src-d64fe51939b5126b7610d657f9e9e3ac1fb16c92.tar.gz chromium_src-d64fe51939b5126b7610d657f9e9e3ac1fb16c92.tar.bz2 |
Merge 88179 - In ViewHttpCacheJob, allow Kill() to be called multiple times as required
by the URLRequestJob interface spec.
R=willchan@chromium.org
BUG=85139
TEST=testcase.crx attached to bug
Review URL: http://codereview.chromium.org/7132004
TBR=adamk@chromium.org
Review URL: http://codereview.chromium.org/7289015
git-svn-id: svn://svn.chromium.org/chrome/branches/782/src@91129 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/net/view_http_cache_job_factory.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/net/view_http_cache_job_factory.cc b/chrome/browser/net/view_http_cache_job_factory.cc index cc61983..86d008c 100644 --- a/chrome/browser/net/view_http_cache_job_factory.cc +++ b/chrome/browser/net/view_http_cache_job_factory.cc @@ -53,7 +53,6 @@ class ViewHttpCacheJob : public net::URLRequestJob { // Prevents it from invoking its callback. It will self-delete. void Orphan() { - DCHECK(user_callback_); user_callback_ = NULL; } @@ -98,8 +97,10 @@ void ViewHttpCacheJob::Start() { void ViewHttpCacheJob::Kill() { method_factory_.RevokeAll(); - core_->Orphan(); - core_ = NULL; + if (core_) { + core_->Orphan(); + core_ = NULL; + } net::URLRequestJob::Kill(); } |