зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1482224 Crash in Shutdown due to ProxyAutoConfig still aiming to resolve addressThis crash has arisen due to a loop in ProxyAutoConfig which spins until apending PAC request is complete, even when the ProxyAutoConfig object is beingshut... r=valentin
...down. The remedy to prevent the crash is to exit the loop when the mShutdown flag is set. This does not attempt to address the underlying cause of why the request continues to be pending, although this is also a concern. Files changed: netwerk/base/ProxyAutoConfig.cpp - expanded lambda containing logic of when to stop waiting for the request to complete to include a check to the mShutdown flag. Also logged a warning if the loop is exited because of mShutdown. Differential Revision: https://phabricator.services.mozilla.com/D3977 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bd0bd8a76a
Коммит
06de5fed24
|
@ -452,7 +452,17 @@ ProxyAutoConfig::ResolveAddress(const nsCString &aHostName,
|
|||
// Spin the event loop of the pac thread until lookup is complete.
|
||||
// nsPACman is responsible for keeping a queue and only allowing
|
||||
// one PAC execution at a time even when it is called re-entrantly.
|
||||
SpinEventLoopUntil([&, helper]() { return !helper->mRequest; });
|
||||
SpinEventLoopUntil([&, helper, this]() {
|
||||
if (!helper->mRequest) {
|
||||
return true;
|
||||
}
|
||||
if (this->mShutdown) {
|
||||
NS_WARNING("mShutdown set with PAC request not cancelled");
|
||||
MOZ_ASSERT(NS_FAILED(helper->mStatus));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
if (NS_FAILED(helper->mStatus) ||
|
||||
NS_FAILED(helper->mResponse->GetNextAddr(0, aNetAddr)))
|
||||
|
|
Загрузка…
Ссылка в новой задаче