summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/Http3WebTransportSession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/protocol/http/Http3WebTransportSession.cpp')
-rw-r--r--netwerk/protocol/http/Http3WebTransportSession.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/netwerk/protocol/http/Http3WebTransportSession.cpp b/netwerk/protocol/http/Http3WebTransportSession.cpp
index 9ef4da70c0..cee1fd75fd 100644
--- a/netwerk/protocol/http/Http3WebTransportSession.cpp
+++ b/netwerk/protocol/http/Http3WebTransportSession.cpp
@@ -447,7 +447,10 @@ Http3WebTransportSession::OnIncomingWebTransportStream(
return nullptr;
}
- mListener->OnIncomingStreamAvailableInternal(stream);
+ if (nsCOMPtr<WebTransportSessionEventListenerInternal> listener =
+ do_QueryInterface(mListener)) {
+ listener->OnIncomingStreamAvailableInternal(stream);
+ }
return stream.forget();
}
@@ -470,7 +473,10 @@ void Http3WebTransportSession::OnDatagramReceived(nsTArray<uint8_t>&& aData) {
return;
}
- mListener->OnDatagramReceivedInternal(std::move(aData));
+ if (nsCOMPtr<WebTransportSessionEventListenerInternal> listener =
+ do_QueryInterface(mListener)) {
+ listener->OnDatagramReceivedInternal(std::move(aData));
+ }
}
void Http3WebTransportSession::GetMaxDatagramSize() {