Bug 1481084 - Assertion OnSocketThread() in HttpBackgroundChannelChild::RecvOnStopRequest during shutdown r=dragana

OnSocketTread doesn't work properly during shutdown because nsSocketTransportService2.cpp::gSocketThread is null.
We call gSocketTransportService->IsOnCurrentThreadInfallible() instead, just like we already do in HttpBackgroundChannelChild::ActorDestroy()

Differential Revision: https://phabricator.services.mozilla.com/D5050

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Valentin Gosu 2018-09-06 21:03:10 +00:00
parent 723d009804
commit 4c346828a4

View File

@ -181,7 +181,8 @@ HttpBackgroundChannelChild::RecvOnStopRequest(
const nsHttpHeaderArray& aResponseTrailers)
{
LOG(("HttpBackgroundChannelChild::RecvOnStopRequest [this=%p]\n", this));
MOZ_ASSERT(OnSocketThread());
MOZ_ASSERT(gSocketTransportService);
MOZ_ASSERT(gSocketTransportService->IsOnCurrentThreadInfallible());
// It's enough to set this from (just before) OnStopRequest notification, since
// we don't need this value sooner than a channel was done loading - everything