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

Unified Diff: content/child/blink_platform_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/blink_platform_impl.h ('k') | content/child/webcrypto/shared_crypto.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 78f648ed3152b6a438b100c619e273857f1cbbfe..05eecc926dc4f95d5174ae85f49cac38e02191a5 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -32,7 +32,6 @@
#include "content/child/web_discardable_memory_impl.h"
#include "content/child/web_socket_stream_handle_impl.h"
#include "content/child/web_url_loader_impl.h"
-#include "content/child/webcrypto/webcrypto_impl.h"
#include "content/child/websocket_bridge.h"
#include "content/child/webthread_impl.h"
#include "content/child/worker_task_runner.h"
@@ -907,9 +906,8 @@ void BlinkPlatformImpl::didStopWorkerRunLoop(
}
blink::WebCrypto* BlinkPlatformImpl::crypto() {
- if (!web_crypto_)
- web_crypto_.reset(new WebCryptoImpl());
- return web_crypto_.get();
+ WebCryptoImpl::EnsureInit();
+ return &web_crypto_;
}
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/child/webcrypto/shared_crypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698