diff --git a/ipc/glue/IPCStreamSource.cpp b/ipc/glue/IPCStreamSource.cpp index c31465753ce9..33d007bb914f 100644 --- a/ipc/glue/IPCStreamSource.cpp +++ b/ipc/glue/IPCStreamSource.cpp @@ -243,6 +243,13 @@ void IPCStreamSource::OnStreamReady(Callback* aCallback) { MOZ_ASSERT(aCallback == mCallback); mCallback->ClearSource(); mCallback = nullptr; + + // Possibly closed if this callback is (indirectly) called by + // IPCStreamSourceParent::RecvRequestClose(). + if (mState == eClosed) { + return; + } + DoRead(); }