diff --git a/dom/messagechannel/MessagePortChild.cpp b/dom/messagechannel/MessagePortChild.cpp index 98259e110758..4560b3c4d934 100644 --- a/dom/messagechannel/MessagePortChild.cpp +++ b/dom/messagechannel/MessagePortChild.cpp @@ -23,16 +23,18 @@ MessagePortChild::RecvStopSendingDataConfirmed() bool MessagePortChild::RecvEntangled(nsTArray&& aMessages) { - MOZ_ASSERT(mPort); - mPort->Entangled(aMessages); + if (mPort) { + mPort->Entangled(aMessages); + } return true; } bool MessagePortChild::RecvReceiveData(nsTArray&& aMessages) { - MOZ_ASSERT(mPort); - mPort->MessagesReceived(aMessages); + if (mPort) { + mPort->MessagesReceived(aMessages); + } return true; }