Revert "Don't take a mutex around certificate verifications on Android."
This reverts commit af16f316. Reason for revert: Speculative revert to see if it fixes crbug/735659. Original change's description: > Don't take a mutex around certificate verifications on Android. > > We use a worker pool to verify certificates, but then undo it all in > Android by locking around the entire operation. However, Android's > X509TrustManager implementations are already thread-safe. We do some > work on top which must be synchronized, mostly around reloading various > caches. > > Instead, lock only around acquiring the current instance of the caches. > When we need to invalidate, we drop the pointer. Any pending tasks > will continue using the old state (as they would have before this > change as they'd be holding the lock), but all verifications after the > invalidation will use a fresh set of state. > > A completely unscientific (I checked about:histograms after startup) > suggest that this speeds up the mean startup cert verification time > by about 40%. > > Bug: > Change-Id: I3cddb798f3dfd51a2f1d2e529127c39f521e93de > Reviewed-on: https://chromium-review.googlesource.com/531973 > Reviewed-by: Matt Mueller <mattm@chromium.org> > Commit-Queue: David Benjamin <davidben@chromium.org> > Cr-Commit-Position: refs/heads/master@{#480472} TBR=davidben@chromium.org,mattm@chromium.org Bug: 735659 Change-Id: Ib84eb5b0a03d674565a075ad1003828904aebe24 Reviewed-on: https://chromium-review.googlesource.com/545057Reviewed-by:David Benjamin <davidben@chromium.org> Commit-Queue: David Benjamin <davidben@chromium.org> Cr-Commit-Position: refs/heads/master@{#481689}
Showing
This diff is collapsed.
Please register or sign in to comment