diff options
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/resource_fetcher.h | 2 | ||||
-rw-r--r-- | webkit/glue/resource_fetcher_unittest.cc | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/webkit/glue/resource_fetcher.h b/webkit/glue/resource_fetcher.h index ca666c7..0a9de89 100644 --- a/webkit/glue/resource_fetcher.h +++ b/webkit/glue/resource_fetcher.h @@ -45,7 +45,7 @@ class ResourceFetcher : public WebKit::WebURLLoaderClient { ResourceFetcher( const GURL& url, WebKit::WebFrame* frame, WebKit::WebURLRequest::TargetType target_type, Callback* callback); - ~ResourceFetcher(); + virtual ~ResourceFetcher(); // Stop the request and don't call the callback. void Cancel(); diff --git a/webkit/glue/resource_fetcher_unittest.cc b/webkit/glue/resource_fetcher_unittest.cc index 2888a94..9ef0fc6 100644 --- a/webkit/glue/resource_fetcher_unittest.cc +++ b/webkit/glue/resource_fetcher_unittest.cc @@ -40,6 +40,8 @@ class FetcherDelegate { StartTimer(); } + virtual ~FetcherDelegate() {} + ResourceFetcher::Callback* NewCallback() { return ::NewCallback(this, &FetcherDelegate::OnURLFetchComplete); } @@ -173,12 +175,14 @@ TEST_F(ResourceFetcherTests, ResourceFetcherTimeout) { class EvilFetcherDelegate : public FetcherDelegate { public: + virtual ~EvilFetcherDelegate() {} + void SetFetcher(ResourceFetcher* fetcher) { fetcher_.reset(fetcher); } - void OnURLFetchComplete(const WebURLResponse& response, - const std::string& data) { + virtual void OnURLFetchComplete(const WebURLResponse& response, + const std::string& data) { // Destroy the ResourceFetcher here. We are testing that upon returning // to the ResourceFetcher that it does not crash. fetcher_.reset(); |