зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1520642 - Cancel dns requests before cleaning up db. r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D18989 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3013aa2b9f
Коммит
d26590be47
|
@ -778,6 +778,9 @@ void nsHostResolver::Shutdown() {
|
||||||
|
|
||||||
if (mNumIdleTasks) mIdleTaskCV.NotifyAll();
|
if (mNumIdleTasks) mIdleTaskCV.NotifyAll();
|
||||||
|
|
||||||
|
for (auto iter = mRecordDB.Iter(); !iter.Done(); iter.Next()) {
|
||||||
|
iter.UserData()->Cancel();
|
||||||
|
}
|
||||||
// empty host database
|
// empty host database
|
||||||
mRecordDB.Clear();
|
mRecordDB.Clear();
|
||||||
}
|
}
|
||||||
|
@ -797,10 +800,6 @@ void nsHostResolver::Shutdown() {
|
||||||
pendingQLow.clear();
|
pendingQLow.clear();
|
||||||
evictionQ.clear();
|
evictionQ.clear();
|
||||||
|
|
||||||
for (auto iter = mRecordDB.Iter(); !iter.Done(); iter.Next()) {
|
|
||||||
iter.UserData()->Cancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Shutdown the resolver threads, but with a timeout of 20 seconds.
|
// Shutdown the resolver threads, but with a timeout of 20 seconds.
|
||||||
// If the timeout is exceeded, any stuck threads will be leaked.
|
// If the timeout is exceeded, any stuck threads will be leaked.
|
||||||
mResolverThreads->ShutdownWithTimeout(20 * 1000);
|
mResolverThreads->ShutdownWithTimeout(20 * 1000);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче