diff --git a/netwerk/protocol/data/DataChannelParent.cpp b/netwerk/protocol/data/DataChannelParent.cpp index e803a66b4c0d..04ba90e98122 100644 --- a/netwerk/protocol/data/DataChannelParent.cpp +++ b/netwerk/protocol/data/DataChannelParent.cpp @@ -100,9 +100,18 @@ mozilla::ipc::IPCResult DataChannelParent::RecvNotifyListeners( return IPC_OK(); } + nsAutoCString remoteType; + nsresult rv = GetRemoteType(remoteType); + if (NS_FAILED(rv)) { + return IPC_FAIL(this, "Failed to get remote type"); + } + nsCOMPtr loadInfo; - MOZ_ALWAYS_SUCCEEDS(mozilla::ipc::LoadInfoArgsToLoadInfo( - aDataChannelInfo.loadInfo(), NOT_REMOTE_TYPE, getter_AddRefs(loadInfo))); + rv = mozilla::ipc::LoadInfoArgsToLoadInfo( + aDataChannelInfo.loadInfo(), remoteType, getter_AddRefs(loadInfo)); + if (NS_FAILED(rv)) { + return IPC_FAIL(this, "Failed to deserialize LoadInfo"); + } // Re-create a data channel in the parent process to notify // data-channel-opened observers.