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

Unified Diff: Source/modules/crypto/Crypto.cpp

Issue 16820007: Expose crypto.getRandomValues() to workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 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: Source/modules/crypto/Crypto.cpp
diff --git a/Source/modules/crypto/Crypto.cpp b/Source/modules/crypto/Crypto.cpp
index a2e55daaa82295fd417022c3b1cbe7a6cb09e019..da3613108600f9e85b4f45e43640f2d3f54edde3 100644
--- a/Source/modules/crypto/Crypto.cpp
+++ b/Source/modules/crypto/Crypto.cpp
@@ -57,6 +57,7 @@ Crypto::Crypto()
ScriptWrappable::init(this);
}
+// Note: This implementation must be thread-safe, as it is used by workers.
void Crypto::getRandomValues(ArrayBufferView* array, ExceptionCode& ec)
{
if (!array || !isIntegerArray(array)) {

Powered by Google App Engine
This is Rietveld 408576698