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

Issue 2511773003: Fix potential teardown race conditions with TCPEngineTransport's PostTasks. (Closed)

Created:
4 years, 1 month ago by Kevin M
Modified:
4 years, 1 month ago
Reviewers:
Wez
CC:
chromium-reviews, cbentzel+watch_chromium.org, anandc+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, bgoldman+watch-blimp_chromium.org, steimel+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, dtrainor+watch-blimp_chromium.org, scf+watch-blimp_chromium.org, khushalsagar+watch-blimp_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix potential teardown race conditions with TCPEngineTransport's PostTasks. * Use a weak pointer to ensure that TCPEngineTransport is alive when we invoke the completion callback on sync connection completion. * Replace use Unretained() with a weak pointer on async connection completion. R=wez@chromium.org BUG=663970 Committed: https://crrev.com/58b2a9cbdd3184364a2fd9173c95e2a907296b77 Cr-Commit-Position: refs/heads/master@{#433260}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Use bound callbacks #

Patch Set 3 : git cl format #

Total comments: 6

Patch Set 4 : wez feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -9 lines) Patch
M blimp/net/tcp_engine_transport.h View 2 3 1 chunk +1 line, -0 lines 0 comments Download
M blimp/net/tcp_engine_transport.cc View 1 2 3 2 chunks +6 lines, -9 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
Kevin M
4 years, 1 month ago (2016-11-17 22:03:02 UTC) #2
perumaal
https://codereview.chromium.org/2511773003/diff/1/blimp/net/tcp_engine_transport.cc File blimp/net/tcp_engine_transport.cc (right): https://codereview.chromium.org/2511773003/diff/1/blimp/net/tcp_engine_transport.cc#newcode48 blimp/net/tcp_engine_transport.cc:48: connect_callback_ = callback; Could you just pass the connect_callback_ ...
4 years, 1 month ago (2016-11-17 22:44:22 UTC) #3
Kevin M
https://codereview.chromium.org/2511773003/diff/1/blimp/net/tcp_engine_transport.cc File blimp/net/tcp_engine_transport.cc (right): https://codereview.chromium.org/2511773003/diff/1/blimp/net/tcp_engine_transport.cc#newcode48 blimp/net/tcp_engine_transport.cc:48: connect_callback_ = callback; On 2016/11/17 22:44:22, perumaal wrote: > ...
4 years, 1 month ago (2016-11-17 23:02:49 UTC) #4
Kevin M
https://codereview.chromium.org/2511773003/diff/1/blimp/net/tcp_engine_transport.cc File blimp/net/tcp_engine_transport.cc (right): https://codereview.chromium.org/2511773003/diff/1/blimp/net/tcp_engine_transport.cc#newcode48 blimp/net/tcp_engine_transport.cc:48: connect_callback_ = callback; On 2016/11/17 23:02:49, Kevin M wrote: ...
4 years, 1 month ago (2016-11-17 23:05:41 UTC) #5
Kevin M
Done.
4 years, 1 month ago (2016-11-18 00:03:47 UTC) #6
Wez
LGTM w/ some suggestions. https://codereview.chromium.org/2511773003/diff/40001/blimp/net/tcp_engine_transport.cc File blimp/net/tcp_engine_transport.cc (right): https://codereview.chromium.org/2511773003/diff/40001/blimp/net/tcp_engine_transport.cc#newcode47 blimp/net/tcp_engine_transport.cc:47: weak_factory_.GetWeakPtr(), callback); nit: Up to ...
4 years, 1 month ago (2016-11-18 02:35:47 UTC) #7
Kevin M
https://codereview.chromium.org/2511773003/diff/40001/blimp/net/tcp_engine_transport.cc File blimp/net/tcp_engine_transport.cc (right): https://codereview.chromium.org/2511773003/diff/40001/blimp/net/tcp_engine_transport.cc#newcode47 blimp/net/tcp_engine_transport.cc:47: weak_factory_.GetWeakPtr(), callback); On 2016/11/18 02:35:47, Wez wrote: > nit: ...
4 years, 1 month ago (2016-11-18 18:17:38 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/2511773003/60001
4 years, 1 month ago (2016-11-18 18:18:35 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-18 19:25:31 UTC) #13
commit-bot: I haz the power
4 years, 1 month ago (2016-11-18 19:27:11 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/58b2a9cbdd3184364a2fd9173c95e2a907296b77
Cr-Commit-Position: refs/heads/master@{#433260}

Powered by Google App Engine
This is Rietveld 408576698