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

Issue 7715007: Do not call callback->Run() until we are about to return from this (Closed)

Created:
9 years, 4 months ago by wtc
Modified:
9 years, 4 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Reland r97821. DiskCacheBasedSSLHostInfo needs to be declared with NET_EXPORT_PRIVATE for the shared builds. Do not call callback->Run() until we are about to return from this object because callback->Run() may cause this object to be deleted. Previously we were calling callback->Run() in DoWaitForDataReadyDone(), which returns to the do-while loop in DoLoop(). The do-while loop reads the state_ member. If the object was deleted in callback->Run(), we would be reading state_ after free. Miscellaneous cleanups: omit net::, and use the assign() method of std::string to avoid constructing a temporary object. R=agl@chromium.org,rvargas@chromium.org BUG=84426 TEST=net_unittests --gtest_filter=DiskCacheBasedSSLHostInfo.DeleteInCallback Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98119

Patch Set 1 #

Patch Set 2 : Add NET_EXPORT_PRIVATE to DiskCacheBasedSSLHostInfo. #

Total comments: 1

Patch Set 3 : Also export SSLHostInfo. #

Patch Set 4 : Add ssl_host_info.h to the CL. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -18 lines) Patch
M net/http/disk_cache_based_ssl_host_info.h View 1 3 chunks +8 lines, -5 lines 0 comments Download
M net/http/disk_cache_based_ssl_host_info.cc View 5 chunks +15 lines, -11 lines 0 comments Download
M net/http/http_cache_unittest.cc View 3 chunks +41 lines, -1 line 0 comments Download
M net/socket/ssl_host_info.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
wtc
Patch Set 1 is the reverted CL. So you just need to review the diffs ...
9 years, 4 months ago (2011-08-23 18:15:25 UTC) #1
rvargas (doing something else)
http://codereview.chromium.org/7715007/diff/3002/net/http/disk_cache_based_ssl_host_info.h File net/http/disk_cache_based_ssl_host_info.h (right): http://codereview.chromium.org/7715007/diff/3002/net/http/disk_cache_based_ssl_host_info.h#newcode27 net/http/disk_cache_based_ssl_host_info.h:27: : public SSLHostInfo, SSLHostInfo also has to be exported.
9 years, 4 months ago (2011-08-23 18:20:48 UTC) #2
wtc
rvargas: you're right! Please review Patch Set 4. Thanks.
9 years, 4 months ago (2011-08-23 18:45:20 UTC) #3
rvargas (doing something else)
LGTM
9 years, 4 months ago (2011-08-23 19:04:56 UTC) #4
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years, 4 months ago (2011-08-24 01:29:17 UTC) #5
commit-bot: I haz the power
9 years, 4 months ago (2011-08-24 21:42:16 UTC) #6
Change committed as 98119

Powered by Google App Engine
This is Rietveld 408576698