Non-inline functions that call CallbackList and are called from Chrome
This avoids problems with the Chrome component build.
Bug: webrtc:11943
Change-Id: I120628ee7829aa0255e60e2f21ac0608374340b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348723
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42146}
diff --git a/p2p/base/ice_transport_internal.cc b/p2p/base/ice_transport_internal.cc
index 0dc7e50..15da627 100644
--- a/p2p/base/ice_transport_internal.cc
+++ b/p2p/base/ice_transport_internal.cc
@@ -143,4 +143,14 @@
SetRemoteIceParameters(IceParameters(ice_ufrag, ice_pwd, false));
}
+void IceTransportInternal::AddGatheringStateCallback(
+ const void* removal_tag,
+ absl::AnyInvocable<void(IceTransportInternal*)> callback) {
+ gathering_state_callback_list_.AddReceiver(removal_tag, std::move(callback));
+}
+void IceTransportInternal::RemoveGatheringStateCallback(
+ const void* removal_tag) {
+ gathering_state_callback_list_.RemoveReceivers(removal_tag);
+}
+
} // namespace cricket
diff --git a/p2p/base/ice_transport_internal.h b/p2p/base/ice_transport_internal.h
index 32e913d..78369c0 100644
--- a/p2p/base/ice_transport_internal.h
+++ b/p2p/base/ice_transport_internal.h
@@ -306,15 +306,11 @@
// Signal Exposed for backwards compatibility.
sigslot::signal1<IceTransportInternal*> SignalGatheringState;
+ // Note: These calls must not be inlined in order to avoid linking issues.
void AddGatheringStateCallback(
const void* removal_tag,
- absl::AnyInvocable<void(IceTransportInternal*)> callback) {
- gathering_state_callback_list_.AddReceiver(removal_tag,
- std::move(callback));
- }
- void RemoveGatheringStateCallback(const void* removal_tag) {
- gathering_state_callback_list_.RemoveReceivers(removal_tag);
- }
+ absl::AnyInvocable<void(IceTransportInternal*)> callback);
+ void RemoveGatheringStateCallback(const void* removal_tag);
// Handles sending and receiving of candidates.
sigslot::signal2<IceTransportInternal*, const Candidate&>