Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Issue 1012923003: Fix race in DataReductionProxyService read/write. (Closed)

Created:
5 years, 9 months ago by jeremyim
Modified:
5 years, 9 months ago
Reviewers:
bengr
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race in DataReductionProxyService read/write. CreateNetworkDelegate is called on the IO thread, but SetDataReductionProxyService is called on the UI thread. There is the possibility for a race to occur in reading/writing the value of the WeakPtr; we can avoid it by passing a callback to DataReductionProxyUsageStats (instead of the WeakPtr), since we are guaranteed that the callback is called on the UI thread. BUG=460876 Committed: https://crrev.com/5f46d2c4e1da91e38d197e04677e68e12a7eda77 Cr-Commit-Position: refs/heads/master@{#320822}

Patch Set 1 #

Total comments: 4

Patch Set 2 : bengr CR comment #

Messages

Total messages: 9 (2 generated)
jeremyim
PTAL. =)
5 years, 9 months ago (2015-03-16 21:47:28 UTC) #2
bengr
https://codereview.chromium.org/1012923003/diff/1/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc (right): https://codereview.chromium.org/1012923003/diff/1/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc#newcode120 components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc:120: service_->settings()->SetUnreachable(unreachable); Is settings() guaranteed to be non-null? If yes, ...
5 years, 9 months ago (2015-03-16 21:58:01 UTC) #3
jeremyim
https://codereview.chromium.org/1012923003/diff/1/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc (right): https://codereview.chromium.org/1012923003/diff/1/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc#newcode120 components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc:120: service_->settings()->SetUnreachable(unreachable); On 2015/03/16 21:58:01, bengr wrote: > Is settings() ...
5 years, 9 months ago (2015-03-16 22:31:59 UTC) #4
bengr
lgtm. Would be nice to avoid the callback, but it seems ok in this case.
5 years, 9 months ago (2015-03-16 22:45:49 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1012923003/20001
5 years, 9 months ago (2015-03-16 22:48:30 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 9 months ago (2015-03-16 23:21:30 UTC) #8
commit-bot: I haz the power
5 years, 9 months ago (2015-03-16 23:22:25 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5f46d2c4e1da91e38d197e04677e68e12a7eda77
Cr-Commit-Position: refs/heads/master@{#320822}

Powered by Google App Engine
This is Rietveld 408576698