backport m-c bug 1333174 - Don't use NS_ENSURE_SUCCESS at nsIOService:793

Log spam fix. Suppresses 1,100 instances of NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80520012 emitted from netwerk/base/nsIOService.cpp during linux64 debug testing. Backports [m-c 1333174](https://bugzilla.mozilla.org/show_bug.cgi?id=1333174).
This commit is contained in:
Gaming4JC 2018-10-22 21:28:24 -04:00 committed by Roy Tam
commit 961f369d66

View file

@ -789,7 +789,9 @@ nsIOService::NewChannelFromURIWithProxyFlagsInternal(nsIURI* aURI,
// creating a new channel by calling NewChannel().
if (NS_FAILED(rv)) {
rv = handler->NewChannel(aURI, getter_AddRefs(channel));
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv)) {
return rv;
}
// The protocol handler does not implement NewChannel2, so
// maybe we need to wrap the channel (see comment in MaybeWrap
// function).