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

Issue 4299001: Update CertVerifier to watch for the origin loop's destruction, so that (Closed)

Created:
10 years, 1 month ago by Zachary Kuznia
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Alexander Potapenko, pam+watch_chromium.org, Paweł Hajdan Jr., stuartmorgan+watch_chromium.org, Timur Iskhodzhanov
Visibility:
Public.

Description

Update CertVerifier to watch for the origin loop's destruction, so that it doesn't crash if the SSLClientSocket is leaked. BUG=chromium-os:8179 BUG=62314 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=65349

Patch Set 1 #

Patch Set 2 : Code Review #

Total comments: 2

Patch Set 3 : Add a missing comment #

Patch Set 4 : Remove the observer on cleanup #

Total comments: 8

Patch Set 5 : Code review fixes #

Patch Set 6 : Remove braces. #

Total comments: 4

Patch Set 7 : Code review fixes #

Patch Set 8 : Address valgrind issue #

Patch Set 9 : Remove net_unittests gtest exclusions. #

Total comments: 8

Patch Set 10 : Code review fixes #

Total comments: 5

Patch Set 11 : Fix scoping on a lock #

Patch Set 12 : Proper scoping of lock, static cast. #

Total comments: 2

Patch Set 13 : Remove null check #

Total comments: 1

Patch Set 14 : To mutable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -7 lines) Patch
M net/base/cert_verifier.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/base/cert_verifier.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +39 lines, -3 lines 0 comments Download
M tools/valgrind/gtest_exclude/net_unittests.gtest_mac.txt View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Zachary Kuznia
10 years, 1 month ago (2010-11-02 06:49:15 UTC) #1
satorux1
The change looks good tome, but please wait for wtc@'s reviews. http://codereview.chromium.org/4299001/diff/2001/3001 File net/base/cert_verifier.cc (right): ...
10 years, 1 month ago (2010-11-02 06:57:02 UTC) #2
Zachary Kuznia
http://codereview.chromium.org/4299001/diff/2001/3001 File net/base/cert_verifier.cc (right): http://codereview.chromium.org/4299001/diff/2001/3001#newcode99 net/base/cert_verifier.cc:99: virtual void WillDestroyCurrentMessageLoop() { On 2010/11/02 06:57:02, satorux1 wrote: ...
10 years, 1 month ago (2010-11-02 07:03:52 UTC) #3
willchan no longer on Chromium
Can we explicitly kill the SSLClientSocket on sync thread shutdown rather than letting it leak? ...
10 years, 1 month ago (2010-11-02 09:59:08 UTC) #4
wtc
zork: I have some nits and a question about your change to the destructor below. ...
10 years, 1 month ago (2010-11-02 17:56:14 UTC) #5
willchan no longer on Chromium
I should clarify that as a crash fix, using DestructionObserver (or better yet, MessageLoopProxy) is ...
10 years, 1 month ago (2010-11-03 11:08:32 UTC) #6
Zachary Kuznia
willchan: It doesn't look like we can use MessageLoopProxy, since it's created from a Chrome ...
10 years, 1 month ago (2010-11-04 05:07:07 UTC) #7
willchan no longer on Chromium
As discussed offline, I'm fine with this as a temporary solution to prevent a leak ...
10 years, 1 month ago (2010-11-04 09:48:47 UTC) #8
wtc
LGTM. This code is very subtle, so I had to spend some time to remind ...
10 years, 1 month ago (2010-11-04 22:34:11 UTC) #9
Zachary Kuznia
http://codereview.chromium.org/4299001/diff/9001/10001 File net/base/cert_verifier.cc (right): http://codereview.chromium.org/4299001/diff/9001/10001#newcode109 net/base/cert_verifier.cc:109: ~Request() { On 2010/11/04 22:34:11, wtc wrote: > On ...
10 years, 1 month ago (2010-11-05 08:15:15 UTC) #10
Timur Iskhodzhanov
SSLClientSocketTest.Connect has started failing under Valgrind and ThreadSanitizer after this commit; see http://crbug.com/62314 Please watch ...
10 years, 1 month ago (2010-11-08 09:37:58 UTC) #11
Zachary Kuznia
My original patch DCHECKed on valgrind due to removing the observer on the wrong thread, ...
10 years, 1 month ago (2010-11-09 08:04:22 UTC) #12
Timur Iskhodzhanov
Regarding the net/base/ part - leaving the review to wtc. Please also remove the gtest ...
10 years, 1 month ago (2010-11-09 09:17:55 UTC) #13
Zachary Kuznia
On 2010/11/09 09:17:55, Timur Iskhodzhanov wrote: > Regarding the net/base/ part - leaving the review ...
10 years, 1 month ago (2010-11-09 10:52:11 UTC) #14
Timur Iskhodzhanov
tools/valgrind part - LGTM please add the BUG=62314 line to the description On 2010/11/09 10:52:11, ...
10 years, 1 month ago (2010-11-09 13:02:19 UTC) #15
wtc
zork: this is the first time I read code that uses the Traits of RefCountedThreadSafe, ...
10 years, 1 month ago (2010-11-10 22:18:20 UTC) #16
willchan no longer on Chromium
http://codereview.chromium.org/4299001/diff/34001/net/base/cert_verifier.cc File net/base/cert_verifier.cc (right): http://codereview.chromium.org/4299001/diff/34001/net/base/cert_verifier.cc#newcode112 net/base/cert_verifier.cc:112: void OnDestruct() const { I am concerned about this. ...
10 years, 1 month ago (2010-11-10 22:33:17 UTC) #17
Zachary Kuznia
http://codereview.chromium.org/4299001/diff/34001/net/base/cert_verifier.cc File net/base/cert_verifier.cc (right): http://codereview.chromium.org/4299001/diff/34001/net/base/cert_verifier.cc#newcode62 net/base/cert_verifier.cc:62: if (origin_loop_ && verifier_) { On 2010/11/10 22:18:20, wtc ...
10 years, 1 month ago (2010-11-11 10:35:31 UTC) #18
wtc
LGTM. Would be nice to get willchan's OK, but you can check this in first ...
10 years, 1 month ago (2010-11-11 22:24:11 UTC) #19
willchan no longer on Chromium
http://codereview.chromium.org/4299001/diff/42001/net/base/cert_verifier.cc File net/base/cert_verifier.cc (right): http://codereview.chromium.org/4299001/diff/42001/net/base/cert_verifier.cc#newcode118 net/base/cert_verifier.cc:118: AutoLock locked(origin_loop_lock_); Won't this crash? On line 122, you ...
10 years, 1 month ago (2010-11-12 00:32:28 UTC) #20
wtc
http://codereview.chromium.org/4299001/diff/42001/net/base/cert_verifier.cc File net/base/cert_verifier.cc (right): http://codereview.chromium.org/4299001/diff/42001/net/base/cert_verifier.cc#newcode118 net/base/cert_verifier.cc:118: AutoLock locked(origin_loop_lock_); willchan: you're right. Good catch. By the ...
10 years, 1 month ago (2010-11-12 00:43:59 UTC) #21
Zachary Kuznia
http://codereview.chromium.org/4299001/diff/42001/net/base/cert_verifier.cc File net/base/cert_verifier.cc (right): http://codereview.chromium.org/4299001/diff/42001/net/base/cert_verifier.cc#newcode115 net/base/cert_verifier.cc:115: // thread. Using OnDestruct is called by RequestTraits to ...
10 years, 1 month ago (2010-11-15 10:25:09 UTC) #22
wtc
LGTM. willchan: could you do the honor of signing off on this CL? http://codereview.chromium.org/4299001/diff/51001/net/base/cert_verifier.cc File ...
10 years, 1 month ago (2010-11-15 23:57:14 UTC) #23
Zachary Kuznia
http://codereview.chromium.org/4299001/diff/51001/net/base/cert_verifier.cc File net/base/cert_verifier.cc (right): http://codereview.chromium.org/4299001/diff/51001/net/base/cert_verifier.cc#newcode38 net/base/cert_verifier.cc:38: if (origin_loop_) On 2010/11/15 23:57:15, wtc wrote: > Let's ...
10 years, 1 month ago (2010-11-16 01:14:39 UTC) #24
willchan no longer on Chromium
10 years, 1 month ago (2010-11-18 01:41:13 UTC) #25
LGTM

http://codereview.chromium.org/4299001/diff/57001/net/base/cert_verifier.cc
File net/base/cert_verifier.cc (right):

http://codereview.chromium.org/4299001/diff/57001/net/base/cert_verifier.cc#n...
net/base/cert_verifier.cc:116: void OnDestruct() {
Why is this non-const?  Please make |origin_loop_lock_| mutable instead and
remove the const_cast<>.

Powered by Google App Engine
This is Rietveld 408576698