Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: net/disk_cache/simple/simple_backend_impl.cc

Issue 1086733002: Ensure tests have an active task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_backend_impl.cc
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 38086441ebda528f93034956d4e85eb94945cbd3..b5a6c9ef36221bc20dc8faf9e4af7c0be6ca172a 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -735,7 +735,9 @@ void SimpleBackendImpl::DoomEntriesComplete(
// static
void SimpleBackendImpl::FlushWorkerPoolForTesting() {
- g_sequenced_worker_pool.Get().FlushForTesting();
+ // We only need to do this if we there is an active task runner.
+ if (base::ThreadTaskRunnerHandle::IsSet())
+ g_sequenced_worker_pool.Get().FlushForTesting();
}
} // namespace disk_cache
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698