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

Issue 2533753003: Make DnsSocketPool copy RandIntCallback (Closed)

Created:
4 years ago by Julia Tuttle
Modified:
4 years ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make DnsSocketPool copy RandIntCallback DnsSocketPool is created by DnsClient, and passed a reference to the RandIntCallback in DnsClient. It is then stored in DnsSession, which is ref-counted (so running transactions can continue while DnsSession is recreated on config changes). Unfortunately, if the DnsClient itself is destroyed, the DnsSession hangs around, holding on to the DnsSocketPool, which is holding on to a reference to the RandIntCallback in the destroyed DnsClient. Fix this by copying the RandIntCallback into the DnsSocketPool when it is constructed. (Also, rearrange destructor to satisfy the linter.) BUG=664457 Committed: https://crrev.com/2dd66098349196a1048403810c0faadf05072387 Cr-Commit-Position: refs/heads/master@{#434752}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Put methods in right order. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M net/dns/dns_socket_pool.h View 2 chunks +2 lines, -2 lines 0 comments Download
M net/dns/dns_socket_pool.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (13 generated)
mmenke
Wow, that is bad. LGTM! https://codereview.chromium.org/2533753003/diff/1/net/dns/dns_socket_pool.cc File net/dns/dns_socket_pool.cc (right): https://codereview.chromium.org/2533753003/diff/1/net/dns/dns_socket_pool.cc#newcode227 net/dns/dns_socket_pool.cc:227: DnsSocketPool::~DnsSocketPool() {} declaration order ...
4 years ago (2016-11-28 20:05:42 UTC) #6
Julia Tuttle
https://codereview.chromium.org/2533753003/diff/1/net/dns/dns_socket_pool.cc File net/dns/dns_socket_pool.cc (right): https://codereview.chromium.org/2533753003/diff/1/net/dns/dns_socket_pool.cc#newcode227 net/dns/dns_socket_pool.cc:227: DnsSocketPool::~DnsSocketPool() {} On 2016/11/28 20:05:42, mmenke wrote: > declaration ...
4 years ago (2016-11-28 20:10:37 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2533753003/20001
4 years ago (2016-11-28 21:37:05 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-11-28 22:49:12 UTC) #16
commit-bot: I haz the power
4 years ago (2016-11-28 22:52:42 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/2dd66098349196a1048403810c0faadf05072387
Cr-Commit-Position: refs/heads/master@{#434752}

Powered by Google App Engine
This is Rietveld 408576698