зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e52521c921
Коммит
6b410b5b48
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче