Commit 11464f93 authored by David Benjamin's avatar David Benjamin Committed by Commit Bot

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: default avatarDavid Benjamin <davidben@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481689}
parent 861dba53
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment