Bug 1182516 - Add Chaos Mode environment variable MOZ_CHAOSMODE. r=roc
This commit is contained in:
@@ -236,7 +236,7 @@ TimerThread::Run()
|
||||
if (mSleeping) {
|
||||
// Sleep for 0.1 seconds while not firing timers.
|
||||
uint32_t milliseconds = 100;
|
||||
if (ChaosMode::isActive(ChaosMode::TimerScheduling)) {
|
||||
if (ChaosMode::isActive(ChaosFeature::TimerScheduling)) {
|
||||
milliseconds = ChaosMode::randomUint32LessThan(200);
|
||||
}
|
||||
waitFor = PR_MillisecondsToInterval(milliseconds);
|
||||
@@ -320,7 +320,7 @@ TimerThread::Run()
|
||||
// interval is so small we should not wait at all).
|
||||
double microseconds = (timeout - now).ToMilliseconds() * 1000;
|
||||
|
||||
if (ChaosMode::isActive(ChaosMode::TimerScheduling)) {
|
||||
if (ChaosMode::isActive(ChaosFeature::TimerScheduling)) {
|
||||
// The mean value of sFractions must be 1 to ensure that
|
||||
// the average of a long sequence of timeouts converges to the
|
||||
// actual sum of their times.
|
||||
|
||||
Reference in New Issue
Block a user