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

Unified Diff: src/isolate-inl.h

Issue 333053002: Untangle RNG from v8 core (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 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
« no previous file with comments | « src/globals.h ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate-inl.h
diff --git a/src/isolate-inl.h b/src/isolate-inl.h
index c33e61d41777618478bb66cf71ed83913f2d3e4f..12a861f2b8961653c63566bef388735739c2db83 100644
--- a/src/isolate-inl.h
+++ b/src/isolate-inl.h
@@ -32,7 +32,11 @@ bool Isolate::DebuggerHasBreakPoints() {
RandomNumberGenerator* Isolate::random_number_generator() {
if (random_number_generator_ == NULL) {
- random_number_generator_ = new RandomNumberGenerator;
+ if (FLAG_random_seed != 0) {
+ random_number_generator_ = new RandomNumberGenerator(FLAG_random_seed);
+ } else {
+ random_number_generator_ = new RandomNumberGenerator();
+ }
}
return random_number_generator_;
}
« no previous file with comments | « src/globals.h ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698