summaryrefslogtreecommitdiffstats
path: root/webkit/glue/resource_fetcher.cc
diff options
context:
space:
mode:
authormad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 20:47:55 +0000
committermad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 20:47:55 +0000
commit2c76fcd0d9266387e844d98dfb106410c4854928 (patch)
treecc9c3c0ebb73cd2718f1a2e1ae3dc5a79361a287 /webkit/glue/resource_fetcher.cc
parentf11695a0b2eeb605fa9f21bcf5c991ef1bcc765a (diff)
downloadchromium_src-2c76fcd0d9266387e844d98dfb106410c4854928.zip
chromium_src-2c76fcd0d9266387e844d98dfb106410c4854928.tar.gz
chromium_src-2c76fcd0d9266387e844d98dfb106410c4854928.tar.bz2
As described in the bug comments, there is a small hole which makes it possible for this object to be destroyed before it has been fully initialized. So we must protect against that.
BUG=http://crbug.com/8060 Review URL: http://codereview.chromium.org/27281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/resource_fetcher.cc')
-rw-r--r--webkit/glue/resource_fetcher.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/webkit/glue/resource_fetcher.cc b/webkit/glue/resource_fetcher.cc
index ac91399..89fc48a 100644
--- a/webkit/glue/resource_fetcher.cc
+++ b/webkit/glue/resource_fetcher.cc
@@ -32,7 +32,7 @@ ResourceFetcher::ResourceFetcher(const GURL& url, WebCore::Frame* frame,
}
ResourceFetcher::~ResourceFetcher() {
- if (!completed_)
+ if (!completed_ && loader_.get())
loader_->cancel();
loader_ = NULL;
}