summaryrefslogtreecommitdiffstats
path: root/webkit/appcache
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 21:06:47 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 21:06:47 +0000
commite6de0cca5c7d4c0ab765eb2f87cd28a367562747 (patch)
treee6710a2537b4bb3736ba02bd8f07fdcc9f7b0094 /webkit/appcache
parent0a670edfacc27f9d1ec85c2764bc81a955ab15f8 (diff)
downloadchromium_src-e6de0cca5c7d4c0ab765eb2f87cd28a367562747.zip
chromium_src-e6de0cca5c7d4c0ab765eb2f87cd28a367562747.tar.gz
chromium_src-e6de0cca5c7d4c0ab765eb2f87cd28a367562747.tar.bz2
A stab at fixing a crashing bug and a bandaid to prevent the crash if that stab is in the wrong place.
BUG=94620 Review URL: http://codereview.chromium.org/7835023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache')
-rw-r--r--webkit/appcache/appcache_request_handler.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_request_handler.cc b/webkit/appcache/appcache_request_handler.cc
index a90d6d7..583df28 100644
--- a/webkit/appcache/appcache_request_handler.cc
+++ b/webkit/appcache/appcache_request_handler.cc
@@ -58,6 +58,7 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadResource(
if (job_->cache_entry_not_found())
cache_entry_not_found_ = true;
job_ = NULL;
+ storage()->CancelDelegateCallbacks(this);
return NULL;
}
@@ -218,12 +219,16 @@ void AppCacheRequestHandler::OnMainResponseFound(
const GURL& fallback_url, const AppCacheEntry& fallback_entry,
int64 cache_id, const GURL& manifest_url,
bool was_blocked_by_policy) {
+ DCHECK(job_);
DCHECK(host_);
DCHECK(is_main_resource());
DCHECK(!entry.IsForeign());
DCHECK(!fallback_entry.IsForeign());
DCHECK(!(entry.has_response_id() && fallback_entry.has_response_id()));
+ if (!job_)
+ return;
+
if (ResourceType::IsFrame(resource_type_)) {
if (was_blocked_by_policy)
host_->NotifyMainResourceBlocked(manifest_url);