Reviewers: Benedikt Meurer,

Message:
Committed patchset #1 manually as r16896.

Description:
[Sheriff] Revert "Let SetEntropySource() fail if called after V8::Initialize()."

This reverts commit 16889 for breaking the webkit tests.

[email protected]

Committed: https://code.google.com/p/v8/source/detail?r=16896

Please review this at https://codereview.chromium.org/23530071/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+0, -10 lines):
  M include/v8.h
  M src/api.cc


Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 28110826ba3cf10d5ad2ac8c20d29cd5bf7eb325..4206105424d4ed73be4e67c071e810f68d3f57f3 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4540,9 +4540,6 @@ class V8_EXPORT V8 {
   /**
    * Allows the host application to provide a callback which can be used
    * as a source of entropy for random number generators.
-   *
-   * \note Setting an entropy source can only be done very early prior to
-   *   calling Initialize().
    */
   static void SetEntropySource(EntropySource source);

Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index f1ecbf06d3fc242717df85cc486882fc1ffd315f..3030b8a1e03879085f6d801682c8ac4839136d3a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4942,13 +4942,6 @@ bool v8::V8::Initialize() {


 void v8::V8::SetEntropySource(EntropySource entropy_source) {
-  // The entropy source must be set before the library is initialized,
-  // as otherwise not all random number generators will pick up the
-  // entropy source and will fall back to weak entropy instead.
-  i::Isolate* isolate = i::Isolate::UncheckedCurrent();
-  ApiCheck(isolate != NULL && isolate->IsInitialized(),
-           "v8::V8::SetEntropySource",
-           "Cannot set entropy source once V8 is initialized.");
   i::RandomNumberGenerator::SetEntropySource(entropy_source);
 }



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to