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

Unified Diff: content/child/webcrypto/webcrypto_impl.cc

Issue 278513004: [webcrypto] Fix a race in BlinkPlatformImpl::crypto(), by using eager initilization of WebCryptoImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address sleevi comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/webcrypto/webcrypto_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/webcrypto_impl.cc
diff --git a/content/child/webcrypto/webcrypto_impl.cc b/content/child/webcrypto/webcrypto_impl.cc
index 04e031bf0bd95eaa971f7c19656ed8df3b083513..9d3897428bc302baf353767e0aa81ab9ceac26d9 100644
--- a/content/child/webcrypto/webcrypto_impl.cc
+++ b/content/child/webcrypto/webcrypto_impl.cc
@@ -552,12 +552,15 @@ void DoUnwrapKey(scoped_ptr<UnwrapKeyState> passed_state) {
} // namespace
WebCryptoImpl::WebCryptoImpl() {
- webcrypto::Init();
}
WebCryptoImpl::~WebCryptoImpl() {
}
+void WebCryptoImpl::EnsureInit() {
+ webcrypto::Init();
+}
+
void WebCryptoImpl::encrypt(const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
const unsigned char* data,
« no previous file with comments | « content/child/webcrypto/webcrypto_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698