summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-18 22:58:16 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-18 22:58:16 +0000
commit30d4c02828d62976a5b02eae3362c21c76c8fdf5 (patch)
tree136b858a0dfb3c4abcc8de091db0e809243dbc19 /content
parent6f0b138353a9ec881271c9d38ae6c53071496230 (diff)
downloadchromium_src-30d4c02828d62976a5b02eae3362c21c76c8fdf5.zip
chromium_src-30d4c02828d62976a5b02eae3362c21c76c8fdf5.tar.gz
chromium_src-30d4c02828d62976a5b02eae3362c21c76c8fdf5.tar.bz2
[SPDY] Use WeakPtr<HttpServerProperties> instead of raw pointers
This will let us better track down what is causing SpdySessions to be accessing them after they're destroyed, since we'll have crash reports instead of just the SyzyASAN reports. Also use scoped_ptr<HttpServerProperties> when appropriate. BUG=236451 TBR=ajwong@chromium.org, rtenneti@chromium.org, simonjam@chromium.org, wez@chromium.org Review URL: https://codereview.chromium.org/19731002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/loader/resource_scheduler_unittest.cc2
-rw-r--r--content/shell/shell_url_request_context_getter.cc4
2 files changed, 4 insertions, 2 deletions
diff --git a/content/browser/loader/resource_scheduler_unittest.cc b/content/browser/loader/resource_scheduler_unittest.cc
index 32efacd..c28e2ff 100644
--- a/content/browser/loader/resource_scheduler_unittest.cc
+++ b/content/browser/loader/resource_scheduler_unittest.cc
@@ -126,7 +126,7 @@ class ResourceSchedulerTest : public testing::Test {
ui_thread_(BrowserThread::UI, &message_loop_),
io_thread_(BrowserThread::IO, &message_loop_) {
scheduler_.OnClientCreated(kChildId, kRouteId);
- context_.set_http_server_properties(&http_server_properties_);
+ context_.set_http_server_properties(http_server_properties_.GetWeakPtr());
}
virtual ~ResourceSchedulerTest() {
diff --git a/content/shell/shell_url_request_context_getter.cc b/content/shell/shell_url_request_context_getter.cc
index 431392b..dd74b9f 100644
--- a/content/shell/shell_url_request_context_getter.cc
+++ b/content/shell/shell_url_request_context_getter.cc
@@ -126,7 +126,9 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
storage_->set_http_auth_handler_factory(
net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
- storage_->set_http_server_properties(new net::HttpServerPropertiesImpl);
+ storage_->set_http_server_properties(
+ scoped_ptr<net::HttpServerProperties>(
+ new net::HttpServerPropertiesImpl()));
base::FilePath cache_path = base_path_.Append(FILE_PATH_LITERAL("Cache"));
net::HttpCache::DefaultBackend* main_backend =