Bug 1839147 - Fix PHC getting stuck in disabled state r=glandium
commit2695cb575990439b4cb5c1b58287ffe779209fc7
authorPaul Bone <pbone@mozilla.com>
Mon, 26 Jun 2023 23:45:42 +0000 (26 23:45 +0000)
committerPaul Bone <pbone@mozilla.com>
Mon, 26 Jun 2023 23:45:42 +0000 (26 23:45 +0000)
treeae80e247fd51948dc21009ff36750ce17af28fec
parent0a0b2ff51262b3ee3c5833da9f9a2281957f3b02
Bug 1839147 - Fix PHC getting stuck in disabled state r=glandium

PHC can get stuck if sAllocDelay passes 0 while it is disabled.  sAllocDelay
wraps (it's a uint32_t) and will take a long time to reach 0 again.

This patch will reset sAllocDelay if necessary when PHC is re-enabled.

Differential Revision: https://phabricator.services.mozilla.com/D181422
memory/replace/phc/PHC.cpp
memory/replace/phc/test/gtest/TestPHC.cpp