diff --git a/third_party/libwebrtc/README.moz-ff-commit b/third_party/libwebrtc/README.moz-ff-commit index c2fe797777bbc..b42cea31e8c99 100644 --- a/third_party/libwebrtc/README.moz-ff-commit +++ b/third_party/libwebrtc/README.moz-ff-commit @@ -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 diff --git a/third_party/libwebrtc/README.mozilla b/third_party/libwebrtc/README.mozilla index 9c9cb61b637a1..43f3d2e3c5cfe 100644 --- a/third_party/libwebrtc/README.mozilla +++ b/third_party/libwebrtc/README.mozilla @@ -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. diff --git a/third_party/libwebrtc/pc/data_channel_controller.cc b/third_party/libwebrtc/pc/data_channel_controller.cc index 166e181cfe409..1746170f64b43 100644 --- a/third_party/libwebrtc/pc/data_channel_controller.cc +++ b/third_party/libwebrtc/pc/data_channel_controller.cc @@ -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); })); }