Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dart2wasm] Use JS
Math.random
to initialize non-secure Random seed
When a seed is not provided to `Random`, call JS `Math.random` to get two doubles between 0.0 and 1.0, scale the doubles to 32-bit integers, and combine to a single 64-bit. Similar to VM, this seed is generated once during the lifetime of the program and then updated using the PRNG class `_Random`. Fixes #56609. Change-Id: Iaf846c63ff26d353ba6c4a94f61b0bab32624509 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383241 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Ömer Ağacan <[email protected]>
- Loading branch information