Extract the one-time NSS WebCrypto initialization code to the constructor.
Rather than doing it lazily in each method. Construction of WebCryptoImpl already happens lazily, so this will not regress startup performance.
Review URL: https://chromiumcodereview.appspot.com/23754014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222728 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/webcrypto_impl.cc b/content/renderer/webcrypto_impl.cc
index 1a628a3..2905f3b 100644
--- a/content/renderer/webcrypto_impl.cc
+++ b/content/renderer/webcrypto_impl.cc
@@ -8,6 +8,10 @@
namespace content {
+WebCryptoImpl::WebCryptoImpl() {
+ Init();
+}
+
void WebCryptoImpl::digest(
const WebKit::WebCryptoAlgorithm& algorithm,
const unsigned char* data,