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

Issue 7040021: Fix crash condition if caller deletes PseudoTcpAdaptor from within a callback. (Closed)

Created:
9 years, 7 months ago by Wez
Modified:
9 years, 7 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Fix crash condition if caller deletes PseudoTcpAdaptor from within a callback. BUG=82171 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86570

Patch Set 1 #

Patch Set 2 : Make it safe to delete PseudoTcpAdapter from callbacks. #

Total comments: 16

Patch Set 3 : Addressed review comments. #

Total comments: 4

Patch Set 4 : Clean up Core not to have public members. #

Patch Set 5 : Add a unit test. #

Total comments: 2

Patch Set 6 : Change the flag we supply to Close(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -177 lines) Patch
M jingle/glue/pseudotcp_adapter.h View 1 2 2 chunks +10 lines, -40 lines 0 comments Download
M jingle/glue/pseudotcp_adapter.cc View 1 2 3 4 5 7 chunks +273 lines, -137 lines 0 comments Download
M jingle/glue/pseudotcp_adapter_unittest.cc View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
M remoting/protocol/jingle_session.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Wez
Patch to fix crash conditions if calling code deletes the PseudoTcpAdaptor during a callback.
9 years, 7 months ago (2011-05-20 07:51:31 UTC) #1
Wez
On 2011/05/20 07:51:31, Wez wrote: > Patch to fix crash conditions if calling code deletes ...
9 years, 7 months ago (2011-05-20 20:11:27 UTC) #2
Sergey Ulanov
Looks mostly good. Just some nits. http://codereview.chromium.org/7040021/diff/1001/jingle/glue/pseudotcp_adapter.cc File jingle/glue/pseudotcp_adapter.cc (right): http://codereview.chromium.org/7040021/diff/1001/jingle/glue/pseudotcp_adapter.cc#newcode31 jingle/glue/pseudotcp_adapter.cc:31: virtual int Read(net::IOBuffer* ...
9 years, 7 months ago (2011-05-20 22:01:40 UTC) #3
Wez
Comments addressed. http://codereview.chromium.org/7040021/diff/1001/jingle/glue/pseudotcp_adapter.cc File jingle/glue/pseudotcp_adapter.cc (right): http://codereview.chromium.org/7040021/diff/1001/jingle/glue/pseudotcp_adapter.cc#newcode31 jingle/glue/pseudotcp_adapter.cc:31: virtual int Read(net::IOBuffer* buffer, int buffer_size, On ...
9 years, 7 months ago (2011-05-21 08:10:55 UTC) #4
Sergey Ulanov
Just two nits. LGTM otherwise. http://codereview.chromium.org/7040021/diff/7001/jingle/glue/pseudotcp_adapter.cc File jingle/glue/pseudotcp_adapter.cc (right): http://codereview.chromium.org/7040021/diff/7001/jingle/glue/pseudotcp_adapter.cc#newcode49 jingle/glue/pseudotcp_adapter.cc:49: net::CompletionCallback* connect_callback_; Can we ...
9 years, 7 months ago (2011-05-23 20:09:05 UTC) #5
Wez
PTAFL ;) http://codereview.chromium.org/7040021/diff/7001/jingle/glue/pseudotcp_adapter.cc File jingle/glue/pseudotcp_adapter.cc (right): http://codereview.chromium.org/7040021/diff/7001/jingle/glue/pseudotcp_adapter.cc#newcode49 jingle/glue/pseudotcp_adapter.cc:49: net::CompletionCallback* connect_callback_; On 2011/05/23 20:09:05, sergeyu wrote: ...
9 years, 7 months ago (2011-05-23 21:27:02 UTC) #6
Wez
Added a unit test, which helps verify that this fixes the issue.
9 years, 7 months ago (2011-05-23 23:34:09 UTC) #7
Sergey Ulanov
Thanks for adding the test! Still LGTM, just one nit. http://codereview.chromium.org/7040021/diff/10002/jingle/glue/pseudotcp_adapter.cc File jingle/glue/pseudotcp_adapter.cc (right): http://codereview.chromium.org/7040021/diff/10002/jingle/glue/pseudotcp_adapter.cc#newcode206 ...
9 years, 7 months ago (2011-05-24 00:37:34 UTC) #8
Wez
Yes, changing that flag makes no real difference, and I think it's more correct to ...
9 years, 7 months ago (2011-05-24 00:57:09 UTC) #9
commit-bot: I haz the power
9 years, 7 months ago (2011-05-25 04:23:31 UTC) #10
Change committed as 86570

Powered by Google App Engine
This is Rietveld 408576698