commit 47a66937e4b4e195c6f0d921b78595ad7277608f
parent 226e06fa2a0c1fc5abfff6c52c33353bc3a67e14
Author: Dan Baker <dbaker@mozilla.com>
Date: Thu, 20 Nov 2025 13:44:09 -0700
Bug 2000941 - Vendor libwebrtc from a0ff9ca5a2
Upstream commit: https://webrtc.googlesource.com/src/+/a0ff9ca5a21524df3ccd4533f970153be6a71106
dcsctp: Fix incorrect comparison in FullStreamId
The original code implements the comparison incorrectly, which violates
the strict weak ordering required for keys in a std::map.
This change fixes the implementation by using `std::tie` to perform a
correct lexicographical comparison, which is the idiomatic C++ approach.
Bug: webrtc:5696
Change-Id: I2a5d836b10d536d14ccd544b8b8b306535148c96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407880
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45559}
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-11-20T20:40:38.325149+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-11-20T20:43:54.754034+00:00.
# base of lastest vendoring
-8d31c4add2
+a0ff9ca5a2
diff --git a/third_party/libwebrtc/net/dcsctp/rx/interleaved_reassembly_streams.h b/third_party/libwebrtc/net/dcsctp/rx/interleaved_reassembly_streams.h
@@ -12,6 +12,7 @@
#include <cstddef>
#include <map>
+#include <tuple>
#include <utility>
#include "absl/strings/string_view.h"
@@ -55,8 +56,8 @@ class InterleavedReassemblyStreams : public ReassemblyStreams {
: unordered(unordered), stream_id(stream_id) {}
friend bool operator<(FullStreamId a, FullStreamId b) {
- return a.unordered < b.unordered ||
- (!(a.unordered < b.unordered) && (a.stream_id < b.stream_id));
+ return std::tie(a.unordered, a.stream_id) <
+ std::tie(b.unordered, b.stream_id);
}
};