Skip to content

Commit

Permalink
Bug 1843113 - Vendor libwebrtc from a624ee1be7
Browse files Browse the repository at this point in the history
Upstream commit: https://webrtc.googlesource.com/src/+/a624ee1be7a11e795a849edb2a27dc1137d2b63d
    [M114] Avoid touching channel after OnSctpDataChannelClosed

    (cherry picked from commit eec1810760ccbdf95c68ed0d2c2ae10a8575551a)

    Bug: chromium:1454086
    Change-Id: I39573b706c4031d091c45a182b13cb3b2dba6233
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309920
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
    Cr-Original-Commit-Position: refs/heads/main@{#40332}
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310922
    Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
    Cr-Commit-Position: refs/branch-heads/5735@{#5}
    Cr-Branched-From: df7df199abd619e75b9f1d9a7e12fc3f3f748775-refs/heads/main@{#39949}
  • Loading branch information
mfromanmoz committed Jul 14, 2023
1 parent 150ce03 commit 02687f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions third_party/libwebrtc/README.moz-ff-commit
Original file line number Diff line number Diff line change
Expand Up @@ -23502,3 +23502,6 @@ e46e37b6f8
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
d20849d071
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
a624ee1be7
2 changes: 2 additions & 0 deletions third_party/libwebrtc/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -15690,3 +15690,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-07-14T21:01:04.634768.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-07-14T21:02:05.862286.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-07-14T21:03:04.820705.
8 changes: 6 additions & 2 deletions third_party/libwebrtc/pc/data_channel_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,16 @@ void DataChannelController::OnChannelStateChanged(
SctpDataChannel* channel,
DataChannelInterface::DataState state) {
RTC_DCHECK_RUN_ON(network_thread());

// Stash away the internal id here in case `OnSctpDataChannelClosed` ends up
// releasing the last reference to the channel.
const int channel_id = channel->internal_id();

if (state == DataChannelInterface::DataState::kClosed)
OnSctpDataChannelClosed(channel);

signaling_thread()->PostTask(
SafeTask(signaling_safety_.flag(),
[this, channel_id = channel->internal_id(), state = state] {
SafeTask(signaling_safety_.flag(), [this, channel_id, state = state] {
pc_->OnSctpDataChannelStateChanged(channel_id, state);
}));
}
Expand Down

0 comments on commit 02687f4

Please sign in to comment.