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

Unified Diff: public/platform/WebCrypto.h

Issue 253563002: [webcrypto] Make it safe to delete WebCryptoResult from any thread. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use WeakPtr Created 6 years, 8 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
Index: public/platform/WebCrypto.h
diff --git a/public/platform/WebCrypto.h b/public/platform/WebCrypto.h
index 4cb2b5111be117e14d6e2ec5e7dfe8b3cf012332..fbe9ee4ade883834b9fb402e16a4e54525186f8b 100644
--- a/public/platform/WebCrypto.h
+++ b/public/platform/WebCrypto.h
@@ -139,19 +139,21 @@ public:
// Threading
// -----------------------
//
- // The WebCrypto interface will only be called from the render's main
- // thread. All communication back to Blink must be on this same thread.
+ // The WebCrypto interface will be called from blink threads (main or
+ // web worker). All communication back to Blink must be on this same thread.
+ //
// Notably:
//
- // * The WebCryptoResult is NOT threadsafe. It should only be used from
- // the Blink main thread.
+ // * The WebCryptoResult can be copied between threads, however all
+ // methods other than the destructor must be called from the origin
+ // Blink thread.
//
// * WebCryptoKey and WebCryptoAlgorithm ARE threadsafe. They can be
// safely copied between threads and accessed. Copying is cheap because
// they are internally reference counted.
//
// * WebArrayBuffer is NOT threadsafe. It should only be created from the
- // Blink main thread. This means threaded implementations may have to
+ // target Blink thread. This means threaded implementations may have to
// make a copy of the output buffer.
//
// -----------------------
« Source/modules/crypto/CryptoResultImpl.cpp ('K') | « Source/platform/CryptoResult.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698