Firefox in version 16 implements crypto, but not function
getRandomValues, which causes a JavaScript error.
Bug: T91378
Change-Id: If4320e83af74bb1e90cc16d739d143a4bac7471b
crypto = window.crypto || window.msCrypto;
// Based on https://github.com/broofa/node-uuid/blob/bfd9f96127/uuid.js
- if ( crypto ) {
+ if ( crypto && crypto.getRandomValues ) {
// Fill an array with 8 random values, each of which is 8 bits.
// Note that Uint8Array is array-like but does not implement Array.
rnds = new Uint8Array( 8 );