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

Unified Diff: runtime/bin/dartutils.cc

Issue 59773007: - Add a per-isolate pseudo random number generator to the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | « runtime/bin/dartutils.h ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
===================================================================
--- runtime/bin/dartutils.cc (revision 29938)
+++ runtime/bin/dartutils.cc (working copy)
@@ -11,6 +11,7 @@
#include "platform/globals.h"
#include "bin/extensions.h"
+#include "bin/crypto.h"
#include "bin/directory.h"
siva 2013/11/05 23:37:46 extensions.h should come here in the order.
Ivan Posva 2013/11/05 23:44:56 Done.
#include "bin/file.h"
#include "bin/io_buffer.h"
@@ -243,6 +244,11 @@
}
+bool DartUtils::EntropySource(uint8_t* buffer, size_t length) {
+ return Crypto::GetRandomBytes(length, buffer);
+}
+
+
static Dart_Handle SingleArgDart_Invoke(Dart_Handle lib, const char* method,
Dart_Handle arg) {
const int kNumArgs = 1;
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698