Bug 1630223: Replace remaining occurrences of Unsound_IsClosed with !CanSend in CanvasTranslator. r=jrmuizel

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bob Owen 2020-04-15 19:57:38 +00:00
Родитель 8b3995f814
Коммит 6254206e21
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -151,7 +151,7 @@ ipc::IPCResult CanvasTranslator::RecvResumeTranslation() {
}
void CanvasTranslator::StartTranslation() {
if (!TranslateRecording() && !GetIPCChannel()->Unsound_IsClosed()) {
if (!TranslateRecording() && GetIPCChannel()->CanSend()) {
MOZ_ALWAYS_SUCCEEDS(mTranslationTaskQueue->Dispatch(
NewRunnableMethod("CanvasTranslator::StartTranslation", this,
&CanvasTranslator::StartTranslation)));
@ -194,7 +194,7 @@ bool CanvasTranslator::TranslateRecording() {
[&](RecordedEvent* recordedEvent) -> bool {
// Make sure that the whole event was read from the stream.
if (!mStream->good()) {
if (GetIPCChannel()->Unsound_IsClosed()) {
if (!GetIPCChannel()->CanSend()) {
// The other side has closed only warn about read failure.
gfxWarning() << "Failed to read event type: "
<< recordedEvent->GetType();
@ -245,7 +245,7 @@ bool CanvasTranslator::TranslateRecording() {
case _typeenum: { \
auto e = _class(*mStream); \
if (!mStream->good()) { \
if (GetIPCChannel()->Unsound_IsClosed()) { \
if (!GetIPCChannel()->CanSend()) { \
/* The other side has closed only warn about read failure. */ \
gfxWarning() << "Failed to read event type: " << _typeenum; \
} else { \