]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/WeakRandom.h
JavaScriptCore-1218.33.tar.gz
[apple/javascriptcore.git] / runtime / WeakRandom.h
index ff3995e80a95d973cbe93166c24981509c656f52..3cd1016d3bdc29bd8fe20e3e5a75da2514968efb 100644 (file)
@@ -62,12 +62,20 @@ public:
         , m_high(seed)
     {
     }
+    
+    // Returns the seed provided that you've never called get() or getUint32().
+    unsigned seedUnsafe() const { return m_high; }
 
     double get()
     {
         return advance() / (UINT_MAX + 1.0);
     }
 
+    unsigned getUint32()
+    {
+        return advance();
+    }
+
 private:
     unsigned advance()
     {