| Index: cc/surfaces/surface_id_allocator.cc
|
| diff --git a/cc/surfaces/surface_id_allocator.cc b/cc/surfaces/surface_id_allocator.cc
|
| index af4d5932df723a6da76dc79377e0430248785966..e6c4194444275407b3306634111785aa3ce1ce81 100644
|
| --- a/cc/surfaces/surface_id_allocator.cc
|
| +++ b/cc/surfaces/surface_id_allocator.cc
|
| @@ -17,6 +17,10 @@ SurfaceIdAllocator::~SurfaceIdAllocator() {
|
|
|
| LocalFrameId SurfaceIdAllocator::GenerateId() {
|
| uint64_t nonce = base::RandUint64();
|
| + // Since 0 nonce are treated as uninitialized and thus invalid, we need to
|
| + // keep generating until there is a non-zero nonce
|
| + while (nonce == 0)
|
| + nonce = base::RandUint64();
|
| LocalFrameId id(next_id_, nonce);
|
| next_id_++;
|
| return id;
|
|
|