Bug 1206894 follow-up: Add a null check

This commit is contained in:
Ehsan Akhgari 2015-09-21 22:13:39 -04:00
parent 8e1b61b7aa
commit 46ece311dc

View File

@ -66,10 +66,12 @@ InterceptedChannelBase::DoNotifyController()
rv = ResetInterception();
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to resume intercepted network request");
}
rv = dispatcher->Dispatch();
if (NS_WARN_IF(NS_FAILED(rv))) {
rv = ResetInterception();
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to resume intercepted network request");
if (dispatcher) {
rv = dispatcher->Dispatch();
if (NS_WARN_IF(NS_FAILED(rv))) {
rv = ResetInterception();
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to resume intercepted network request");
}
}
mController = nullptr;
}