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

Issue 1392143003: Allways call didReceiveAuthenticationChallenge: completion handler. (Closed)

Created:
5 years, 2 months ago by Eugene But (OOO till 7-30)
Modified:
5 years, 1 month ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Always call didReceiveAuthenticationChallenge: completion handler. iOS throws an exception (which leads to a crash) if didReceiveAuthenticationChallenge: completion handler is deallocated but never called. Crash was happening because CertVerifierBlockAdapter did not call its completion handler if CertVerifierAdapter was destroyed during cert verification (may happen when Tab is closed during the load). Changed CertVerifierBlockAdapter to always call its Verify completion handler by making net::CertVerifier::Request non-cancelable, so each verification request will complete. This change does not extend a lifetime of WKWebView (retaining its completion handler does not retain WKWebView itself). BUG=541484 Committed: https://crrev.com/bb8be86f212df820a44993f270414d459da3964c Cr-Commit-Position: refs/heads/master@{#357014}

Patch Set 1 #

Patch Set 2 : Self review #

Total comments: 2

Patch Set 3 : Added a unittest; Updated comments; #

Total comments: 16

Patch Set 4 : Addressed Ryan's review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -20 lines) Patch
M ios/web/net/cert_verifier_block_adapter.h View 1 2 3 2 chunks +4 lines, -5 lines 0 comments Download
M ios/web/net/cert_verifier_block_adapter.cc View 1 2 3 4 chunks +18 lines, -15 lines 0 comments Download
M ios/web/net/cert_verifier_block_adapter_unittest.cc View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
Eugene But (OOO till 7-30)
Ryan, a side effect of this change is that cert verification requests are not cancelled ...
5 years, 2 months ago (2015-10-09 18:50:54 UTC) #2
stuartmorgan
On 2015/10/09 18:50:54, eugenebut wrote: > even if WKWebView is deallocated I assume you mean ...
5 years, 2 months ago (2015-10-12 14:10:57 UTC) #3
stuartmorgan
Could we still cancel all the work on our end, and just immediately call the ...
5 years, 2 months ago (2015-10-12 14:15:13 UTC) #4
Eugene But (OOO till 7-30)
On 2015/10/12 14:10:57, stuartmorgan wrote: > On 2015/10/09 18:50:54, eugenebut wrote: > > even if ...
5 years, 2 months ago (2015-10-12 14:15:34 UTC) #5
Eugene But (OOO till 7-30)
Updated CL description per Ryan's comment.
5 years, 2 months ago (2015-10-13 20:46:29 UTC) #6
Ryan Sleevi
Sorry for the delays, I continue to be swamped by two different security-incidents and was ...
5 years, 2 months ago (2015-10-19 23:34:28 UTC) #8
Eugene But (OOO till 7-30)
Added a unit test. Thanks for review, PTAL. https://codereview.chromium.org/1392143003/diff/20001/ios/web/net/cert_verifier_block_adapter.cc File ios/web/net/cert_verifier_block_adapter.cc (right): https://codereview.chromium.org/1392143003/diff/20001/ios/web/net/cert_verifier_block_adapter.cc#newcode88 ios/web/net/cert_verifier_block_adapter.cc:88: // ...
5 years, 2 months ago (2015-10-21 22:16:25 UTC) #10
Ryan Sleevi
LGTM % comment nits. https://codereview.chromium.org/1392143003/diff/40001/ios/web/net/cert_verifier_block_adapter.cc File ios/web/net/cert_verifier_block_adapter.cc (right): https://codereview.chromium.org/1392143003/diff/40001/ios/web/net/cert_verifier_block_adapter.cc#newcode19 ios/web/net/cert_verifier_block_adapter.cc:19: // to |net::CertVerifier::Request|. This comment ...
5 years, 1 month ago (2015-10-28 18:32:27 UTC) #11
Eugene But (OOO till 7-30)
Thanks Ryan! Answering to Stuart's question about WebView lifetime: This CL does not extend a ...
5 years, 1 month ago (2015-10-29 15:43:38 UTC) #13
stuartmorgan
lgtm
5 years, 1 month ago (2015-10-29 22:24:14 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392143003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392143003/60001
5 years, 1 month ago (2015-10-30 01:18:45 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-10-30 01:34:13 UTC) #18
commit-bot: I haz the power
5 years, 1 month ago (2015-10-30 01:34:56 UTC) #19
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/bb8be86f212df820a44993f270414d459da3964c
Cr-Commit-Position: refs/heads/master@{#357014}

Powered by Google App Engine
This is Rietveld 408576698