From 5a02c6dd2c36add15e740f9f1a48bef8c415b677 Mon Sep 17 00:00:00 2001 From: tbansal Date: Tue, 8 Sep 2015 10:48:13 -0700 Subject: [PATCH] Revert of Fix cronet crash on calling IsDataReductionProxyEnabled (patchset #4 id:60001 of https://codereview.chromium.org/1308923003/ ) Reason for revert: This does not help in fixing the cronet crash. Also, it is calling data_reduction_proxy_service->GetWeakPtr() after data_reduction_proxy_service has been Passed. After the ownership is passed, data_reduction_proxy_service is null. Original issue's description: > Fix cronet crash on calling IsDataReductionProxyEnabled > > BUG=526776 > > Committed: https://crrev.com/3b63265bd7f9004f215f40b80bb1f506294e7788 > Cr-Commit-Position: refs/heads/master@{#347295} BUG=528527 Review URL: https://codereview.chromium.org/1304983007 Cr-Commit-Position: refs/heads/master@{#347733} --- components/cronet/android/cronet_data_reduction_proxy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/cronet/android/cronet_data_reduction_proxy.cc b/components/cronet/android/cronet_data_reduction_proxy.cc index 2a809c30d390..c4c19df3a163 100644 --- a/components/cronet/android/cronet_data_reduction_proxy.cc +++ b/components/cronet/android/cronet_data_reduction_proxy.cc @@ -117,11 +117,11 @@ void CronetDataReductionProxy::Init(bool enable, url_request_context_getter_.get(), make_scoped_ptr(new data_reduction_proxy::DataStore()), task_runner_, task_runner_, task_runner_, base::TimeDelta())); + io_data_->SetDataReductionProxyService( + data_reduction_proxy_service->GetWeakPtr()); settings_->InitDataReductionProxySettings( prefs_.get(), io_data_.get(), data_reduction_proxy_service.Pass()); settings_->SetDataReductionProxyEnabled(enable); - io_data_->SetDataReductionProxyService( - data_reduction_proxy_service->GetWeakPtr()); settings_->MaybeActivateDataReductionProxy(true); } -- 2.11.4.GIT