diff options
author | Adam Langley <agl@chromium.org> | 2015-02-03 10:53:37 -0800 |
---|---|---|
committer | Adam Langley <agl@chromium.org> | 2015-02-03 18:54:51 +0000 |
commit | 8e47fd581b6da1215b4d7f32d5807f1b62b66cdb (patch) | |
tree | 14c409babd43193ee8f9f2cf1ec3395242f2ad9e | |
parent | f1a8ec767f06d555f78a6b7aacd2b29d4e2a2071 (diff) | |
download | chromium_src-8e47fd581b6da1215b4d7f32d5807f1b62b66cdb.zip chromium_src-8e47fd581b6da1215b4d7f32d5807f1b62b66cdb.tar.gz chromium_src-8e47fd581b6da1215b4d7f32d5807f1b62b66cdb.tar.bz2 |
Revert of "Revert of "Move the call to CRYPTO_set_NEON_capable up.""
This reverts commit 02f7bf1302c3e613b887fbb3f46dd54f5f5888d3 and
thus effectively relands fa9063829e638aeb72ede79e5d0396a81a0211d1. That
commit was suspected of breaking the EME tests but reverting it didn't
unbreak anything.
https://codereview.chromium.org/899463002/
Cr-Commit-Position: refs/heads/master@{#314375}
-rw-r--r-- | crypto/openssl_util.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/crypto/openssl_util.cc b/crypto/openssl_util.cc index f41b55a..8ea1232 100644 --- a/crypto/openssl_util.cc +++ b/crypto/openssl_util.cc @@ -48,6 +48,18 @@ class OpenSSLInitSingleton { private: friend struct DefaultSingletonTraits<OpenSSLInitSingleton>; OpenSSLInitSingleton() { +#if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) + const bool has_neon = + (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; + // CRYPTO_set_NEON_capable is called before |SSL_library_init| because this + // stops BoringSSL from probing for NEON support via SIGILL in the case + // that getauxval isn't present. + CRYPTO_set_NEON_capable(has_neon); + // See https://code.google.com/p/chromium/issues/detail?id=341598 + base::CPU cpu; + CRYPTO_set_NEON_functional(!cpu.has_broken_neon()); +#endif + SSL_load_error_strings(); SSL_library_init(); int num_locks = CRYPTO_num_locks(); @@ -56,16 +68,6 @@ class OpenSSLInitSingleton { locks_.push_back(new base::Lock()); CRYPTO_set_locking_callback(LockingCallback); CRYPTO_THREADID_set_callback(CurrentThreadId); - -#if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) - const bool has_neon = - (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; - if (has_neon) - CRYPTO_set_NEON_capable(1); - // See https://code.google.com/p/chromium/issues/detail?id=341598 - base::CPU cpu; - CRYPTO_set_NEON_functional(!cpu.has_broken_neon()); -#endif } ~OpenSSLInitSingleton() { |