summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/stress_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache/stress_cache.cc')
-rw-r--r--net/disk_cache/stress_cache.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/stress_cache.cc
index b24aaa2..40a0143 100644
--- a/net/disk_cache/stress_cache.cc
+++ b/net/disk_cache/stress_cache.cc
@@ -184,9 +184,10 @@ void StressTheCache(int iteration) {
// waiting for the debugger to attach.
bool g_crashing = false;
+// RunSoon() and CrashCallback() reference each other, unfortunately.
void RunSoon(MessageLoop* target_loop);
-void Crash() {
+void CrashCallback() {
// Keep trying to run.
RunSoon(MessageLoop::current());
@@ -207,8 +208,9 @@ void Crash() {
}
void RunSoon(MessageLoop* target_loop) {
- int task_delay = 10000; // 10 seconds
- target_loop->PostDelayedTask(FROM_HERE, base::Bind(&Crash), task_delay);
+ const int kTaskDelay = 10000; // 10 seconds
+ target_loop->PostDelayedTask(
+ FROM_HERE, base::Bind(&CrashCallback), kTaskDelay);
}
// We leak everything here :)