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

Issue 1882563004: [Cronet] Make HistogramManager public APIs thread-safe. (Closed)

Created:
4 years, 8 months ago by pauljensen
Modified:
4 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Cronet] Make HistogramManager public APIs thread-safe. CronetEngine.getGlobalMetricsDeltas() exposes the underlying HistogramManager public APIs on multiple threads, so crashes can occur if accessed concurrently. The current public APIs are GetInstance() which simply accesses a thread-safe LazyInstance, and GetDeltas() which doesn't look thread-safe so I've added a Lock. BUG=603028 Committed: https://crrev.com/487de2df8db4a96fd24e6998590ae715142447ec Cr-Commit-Position: refs/heads/master@{#387009}

Patch Set 1 #

Total comments: 3

Patch Set 2 : don't block in GetDeltas #

Patch Set 3 : make lock specific to GetDeltas() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -13 lines) Patch
M components/cronet/histogram_manager.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M components/cronet/histogram_manager.cc View 1 2 1 chunk +15 lines, -12 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
pauljensen
Raman, PTAL.
4 years, 8 months ago (2016-04-13 13:42:32 UTC) #3
bcwhite
https://codereview.chromium.org/1882563004/diff/1/components/cronet/histogram_manager.cc File components/cronet/histogram_manager.cc (right): https://codereview.chromium.org/1882563004/diff/1/components/cronet/histogram_manager.cc#newcode56 components/cronet/histogram_manager.cc:56: base::AutoLock lock(lock_); It doesn't make sense to make multiple, ...
4 years, 8 months ago (2016-04-13 14:12:52 UTC) #5
pauljensen
https://codereview.chromium.org/1882563004/diff/1/components/cronet/histogram_manager.cc File components/cronet/histogram_manager.cc (right): https://codereview.chromium.org/1882563004/diff/1/components/cronet/histogram_manager.cc#newcode56 components/cronet/histogram_manager.cc:56: base::AutoLock lock(lock_); On 2016/04/13 14:12:52, bcwhite wrote: > It ...
4 years, 8 months ago (2016-04-13 14:29:45 UTC) #6
bcwhite
https://codereview.chromium.org/1882563004/diff/1/components/cronet/histogram_manager.cc File components/cronet/histogram_manager.cc (right): https://codereview.chromium.org/1882563004/diff/1/components/cronet/histogram_manager.cc#newcode56 components/cronet/histogram_manager.cc:56: base::AutoLock lock(lock_); > > I suggest explicit Try/Release of ...
4 years, 8 months ago (2016-04-13 14:42:18 UTC) #7
pauljensen
On 2016/04/13 14:42:18, bcwhite wrote: > https://codereview.chromium.org/1882563004/diff/1/components/cronet/histogram_manager.cc > File components/cronet/histogram_manager.cc (right): > > https://codereview.chromium.org/1882563004/diff/1/components/cronet/histogram_manager.cc#newcode56 > ...
4 years, 8 months ago (2016-04-13 14:59:14 UTC) #8
ramant (doing other things)
Thanks for doing this. LGTM.
4 years, 8 months ago (2016-04-13 16:19:20 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1882563004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1882563004/40001
4 years, 8 months ago (2016-04-13 16:27:29 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-13 17:05:46 UTC) #13
commit-bot: I haz the power
4 years, 8 months ago (2016-04-13 17:08:07 UTC) #15
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/487de2df8db4a96fd24e6998590ae715142447ec
Cr-Commit-Position: refs/heads/master@{#387009}

Powered by Google App Engine
This is Rietveld 408576698