diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 23:53:29 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 23:53:29 +0000 |
commit | cb1da54001174e027d1bd5de4dbc5a91dca140e2 (patch) | |
tree | 48d33cd1d9b871682a9ae027f8aecefd367f9b38 /webkit/glue/resource_fetcher.cc | |
parent | 0eef4afcc284b2bb033e1e6097c0680257533081 (diff) | |
download | chromium_src-cb1da54001174e027d1bd5de4dbc5a91dca140e2.zip chromium_src-cb1da54001174e027d1bd5de4dbc5a91dca140e2.tar.gz chromium_src-cb1da54001174e027d1bd5de4dbc5a91dca140e2.tar.bz2 |
Don't forget to free the callbacks!
BUG=none
TEST=none
TBR=brettw
Review URL: http://codereview.chromium.org/149295
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/resource_fetcher.cc')
-rw-r--r-- | webkit/glue/resource_fetcher.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/webkit/glue/resource_fetcher.cc b/webkit/glue/resource_fetcher.cc index 1716a91..e7e6978 100644 --- a/webkit/glue/resource_fetcher.cc +++ b/webkit/glue/resource_fetcher.cc @@ -84,8 +84,10 @@ void ResourceFetcher::didFinishLoading(WebURLLoader* loader) { DCHECK(!completed_); completed_ = true; - if (callback_) + if (callback_.get()) { callback_->Run(response_, data_); + callback_.reset(); + } } void ResourceFetcher::didFail(WebURLLoader* loader, const WebURLError& error) { @@ -93,8 +95,10 @@ void ResourceFetcher::didFail(WebURLLoader* loader, const WebURLError& error) { completed_ = true; // Go ahead and tell our delegate that we're done. - if (callback_) + if (callback_.get()) { callback_->Run(WebURLResponse(), std::string()); + callback_.reset(); + } } ///////////////////////////////////////////////////////////////////////////// |