Bug 927610 part 1. Stop using NS_ERROR_TYPE_ERR in UDPSocket. r=smaug

The only ways DispatchReceivedData can fail are if our scope is torn down, we
OOM when creating a typed array, or we fail to queue a runnable.  These all
seem like pretty unexpected situations, so NS_ERROR_UNEXPECTED seems
appropriate if we don't want to just propagate through the error from
DispatchReceivedData.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-09-24 16:53:44 +00:00
Родитель e52521c921
Коммит 6b410b5b48
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -572,7 +572,7 @@ void UDPSocket::HandleReceivedData(const nsACString& aRemoteAddress,
}
if (NS_FAILED(DispatchReceivedData(aRemoteAddress, aRemotePort, aData))) {
CloseWithReason(NS_ERROR_TYPE_ERR);
CloseWithReason(NS_ERROR_UNEXPECTED);
}
}