summaryrefslogtreecommitdiffstats
path: root/webkit/glue/resource_fetcher.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 20:35:56 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 20:35:56 +0000
commit0fd62c4931b34903e60ab3c82d2cddcea89f8199 (patch)
treefc73e7bb56296e06b1a67aaa312c9854af080b32 /webkit/glue/resource_fetcher.h
parentee2a62078e0a3c44628a80337d6b548883071c5a (diff)
downloadchromium_src-0fd62c4931b34903e60ab3c82d2cddcea89f8199.zip
chromium_src-0fd62c4931b34903e60ab3c82d2cddcea89f8199.tar.gz
chromium_src-0fd62c4931b34903e60ab3c82d2cddcea89f8199.tar.bz2
Fix a potential crash by clearing callback_ before running it.
R=tony BUG=69592 Review URL: http://codereview.chromium.org/6325012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71995 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/resource_fetcher.h')
-rw-r--r--webkit/glue/resource_fetcher.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/webkit/glue/resource_fetcher.h b/webkit/glue/resource_fetcher.h
index 013b326..eb9411b 100644
--- a/webkit/glue/resource_fetcher.h
+++ b/webkit/glue/resource_fetcher.h
@@ -75,9 +75,6 @@ class ResourceFetcher : public WebKit::WebURLLoaderClient {
// URL we're fetching
GURL url_;
- // Callback when we're done
- scoped_ptr<Callback> callback_;
-
// A copy of the original resource response
WebKit::WebURLResponse response_;
@@ -88,6 +85,12 @@ class ResourceFetcher : public WebKit::WebURLLoaderClient {
// Start the actual download.
void Start(WebKit::WebFrame* frame);
+ void RunCallback(const WebKit::WebURLResponse& response,
+ const std::string& data);
+
+ // Callback when we're done
+ scoped_ptr<Callback> callback_;
+
// Buffer to hold the content from the server.
std::string data_;