Bug 1182516 - Add Chaos Mode environment variable MOZ_CHAOSMODE. r=roc

This commit is contained in:
Benoit Girard
2015-07-14 17:29:23 -04:00
parent 2212e22c88
commit b4e210eae2
9 changed files with 42 additions and 29 deletions

View File

@@ -95,7 +95,7 @@ nsEventQueue::PutEvent(already_AddRefed<nsIRunnable>&& aRunnable)
// Avoid calling AddRef+Release while holding our monitor.
nsCOMPtr<nsIRunnable> event(aRunnable);
if (ChaosMode::isActive(ChaosMode::ThreadScheduling)) {
if (ChaosMode::isActive(ChaosFeature::ThreadScheduling)) {
// With probability 0.5, yield so other threads have a chance to
// dispatch events to this queue first.
if (ChaosMode::randomUint32LessThan(2)) {