diff options
Diffstat (limited to 'chrome/common/child_process_host.cc')
-rw-r--r-- | chrome/common/child_process_host.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc index 1d48350..7327769 100644 --- a/chrome/common/child_process_host.cc +++ b/chrome/common/child_process_host.cc @@ -250,8 +250,10 @@ ChildProcessHost::Iterator::Iterator() ChildProcessHost::Iterator::Iterator(ProcessType type) : all_(false), type_(type) { - DCHECK(MessageLoop::current() == - ChromeThread::GetMessageLoop(ChromeThread::IO)) << + // IO loop can be NULL in unit tests. + DCHECK(!ChromeThread::GetMessageLoop(ChromeThread::IO) || + MessageLoop::current() == + ChromeThread::GetMessageLoop(ChromeThread::IO)) << "ChildProcessInfo::Iterator must be used on the IO thread."; iterator_ = Singleton<ChildProcessList>::get()->begin(); if (!Done() && (*iterator_)->type() != type_) |