diff --git a/audio/BUILD.gn b/audio/BUILD.gn index 04ad6fa507..bc61c3169b 100644 --- a/audio/BUILD.gn +++ b/audio/BUILD.gn @@ -94,7 +94,6 @@ rtc_library("audio") { "../rtc_base/experiments:field_trial_parser", "../rtc_base/synchronization:mutex", "../rtc_base/synchronization:sequence_checker", - "../rtc_base/system:no_unique_address", "../rtc_base/task_utils:to_queued_task", "../system_wrappers", "../system_wrappers:field_trial", diff --git a/audio/channel_receive_frame_transformer_delegate.h b/audio/channel_receive_frame_transformer_delegate.h index 3227c55914..73112d10e3 100644 --- a/audio/channel_receive_frame_transformer_delegate.h +++ b/audio/channel_receive_frame_transformer_delegate.h @@ -15,7 +15,6 @@ #include "api/frame_transformer_interface.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" #include "rtc_base/thread.h" @@ -62,7 +61,7 @@ class ChannelReceiveFrameTransformerDelegate : public TransformedFrameCallback { ~ChannelReceiveFrameTransformerDelegate() override = default; private: - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; ReceiveFrameCallback receive_frame_callback_ RTC_GUARDED_BY(sequence_checker_); rtc::scoped_refptr frame_transformer_ diff --git a/audio/voip/BUILD.gn b/audio/voip/BUILD.gn index f4b6142a74..52f9d07f17 100644 --- a/audio/voip/BUILD.gn +++ b/audio/voip/BUILD.gn @@ -98,7 +98,6 @@ rtc_library("audio_egress") { "../../rtc_base:thread_checker", "../../rtc_base:timeutils", "../../rtc_base/synchronization:mutex", - "../../rtc_base/system:no_unique_address", "../utility:audio_frame_operations", ] } diff --git a/call/BUILD.gn b/call/BUILD.gn index 63163b7f18..c9751358e8 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -224,7 +224,6 @@ rtc_library("bitrate_allocator") { "../rtc_base:rtc_base_approved", "../rtc_base:safe_minmax", "../rtc_base/synchronization:sequence_checker", - "../rtc_base/system:no_unique_address", "../system_wrappers", "../system_wrappers:field_trial", "../system_wrappers:metrics", @@ -285,7 +284,6 @@ rtc_library("call") { "../rtc_base/experiments:field_trial_parser", "../rtc_base/network:sent_packet", "../rtc_base/synchronization:sequence_checker", - "../rtc_base/system:no_unique_address", "../rtc_base/task_utils:pending_task_safety_flag", "../system_wrappers", "../system_wrappers:field_trial", diff --git a/call/bitrate_allocator.h b/call/bitrate_allocator.h index 481d91b23c..8d9a1adb0e 100644 --- a/call/bitrate_allocator.h +++ b/call/bitrate_allocator.h @@ -22,7 +22,6 @@ #include "api/call/bitrate_allocation.h" #include "api/transport/network_types.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { @@ -149,7 +148,7 @@ class BitrateAllocator : public BitrateAllocatorInterface { // video send stream. static uint8_t GetTransmissionMaxBitrateMultiplier(); - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequenced_checker_; + SequenceChecker sequenced_checker_; LimitObserver* const limit_observer_ RTC_GUARDED_BY(&sequenced_checker_); // Stored in a list to keep track of the insertion order. std::vector allocatable_tracks_ diff --git a/call/call.cc b/call/call.cc index ca6973238e..e814cff5b6 100644 --- a/call/call.cc +++ b/call/call.cc @@ -51,7 +51,6 @@ #include "rtc_base/logging.h" #include "rtc_base/strings/string_builder.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_utils/pending_task_safety_flag.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/time_utils.h" @@ -533,7 +532,7 @@ class SharedModuleThread::Impl { } private: - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; mutable int ref_count_ RTC_GUARDED_BY(sequence_checker_) = 0; std::unique_ptr const module_thread_; std::function const on_one_ref_remaining_; diff --git a/call/call_factory.h b/call/call_factory.h index 2426caae47..65c0b6532a 100644 --- a/call/call_factory.h +++ b/call/call_factory.h @@ -15,7 +15,6 @@ #include "call/call.h" #include "call/call_config.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { @@ -28,7 +27,7 @@ class CallFactory : public CallFactoryInterface { Call* CreateCall(const CallConfig& config) override; - RTC_NO_UNIQUE_ADDRESS SequenceChecker call_thread_; + SequenceChecker call_thread_; rtc::scoped_refptr module_thread_ RTC_GUARDED_BY(call_thread_); }; diff --git a/logging/BUILD.gn b/logging/BUILD.gn index 7111f0a9da..7a8922d4a2 100644 --- a/logging/BUILD.gn +++ b/logging/BUILD.gn @@ -268,7 +268,6 @@ if (rtc_enable_protobuf) { "../rtc_base:rtc_task_queue", "../rtc_base:safe_minmax", "../rtc_base/synchronization:sequence_checker", - "../rtc_base/system:no_unique_address", ] absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] } diff --git a/logging/rtc_event_log/rtc_event_log_impl.h b/logging/rtc_event_log/rtc_event_log_impl.h index bdbde612eb..9c7aae669d 100644 --- a/logging/rtc_event_log/rtc_event_log_impl.h +++ b/logging/rtc_event_log/rtc_event_log_impl.h @@ -24,7 +24,6 @@ #include "api/task_queue/task_queue_factory.h" #include "logging/rtc_event_log/encoder/rtc_event_log_encoder.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" #include "rtc_base/thread_annotations.h" @@ -79,7 +78,7 @@ class RtcEventLogImpl final : public RtcEventLog { int64_t last_output_ms_ RTC_GUARDED_BY(*task_queue_); bool output_scheduled_ RTC_GUARDED_BY(*task_queue_); - RTC_NO_UNIQUE_ADDRESS SequenceChecker logging_state_checker_; + SequenceChecker logging_state_checker_; bool logging_state_started_ RTC_GUARDED_BY(logging_state_checker_); // Since we are posting tasks bound to |this|, it is critical that the event diff --git a/media/BUILD.gn b/media/BUILD.gn index f66578587d..b73661295c 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -196,7 +196,6 @@ rtc_library("rtc_simulcast_encoder_adapter") { "../rtc_base:rtc_base_approved", "../rtc_base/experiments:rate_control_settings", "../rtc_base/synchronization:sequence_checker", - "../rtc_base/system:no_unique_address", "../rtc_base/system:rtc_export", "../system_wrappers", "../system_wrappers:field_trial", diff --git a/media/engine/simulcast_encoder_adapter.h b/media/engine/simulcast_encoder_adapter.h index 1067df8ed1..5b2c027577 100644 --- a/media/engine/simulcast_encoder_adapter.h +++ b/media/engine/simulcast_encoder_adapter.h @@ -26,7 +26,6 @@ #include "modules/video_coding/utility/framerate_controller.h" #include "rtc_base/atomic_ops.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -125,7 +124,7 @@ class RTC_EXPORT SimulcastEncoderAdapter : public VideoEncoder { EncodedImageCallback* encoded_complete_callback_; // Used for checking the single-threaded access of the encoder interface. - RTC_NO_UNIQUE_ADDRESS SequenceChecker encoder_queue_; + SequenceChecker encoder_queue_; // Store encoders in between calls to Release and InitEncode, so they don't // have to be recreated. Remaining encoders are destroyed by the destructor. diff --git a/modules/congestion_controller/rtp/BUILD.gn b/modules/congestion_controller/rtp/BUILD.gn index a030976a96..2f97b67263 100644 --- a/modules/congestion_controller/rtp/BUILD.gn +++ b/modules/congestion_controller/rtp/BUILD.gn @@ -31,7 +31,6 @@ rtc_library("control_handler") { "../../../rtc_base:checks", "../../../rtc_base:safe_minmax", "../../../rtc_base/synchronization:sequence_checker", - "../../../rtc_base/system:no_unique_address", "../../../system_wrappers:field_trial", "../../pacing", ] diff --git a/modules/congestion_controller/rtp/control_handler.h b/modules/congestion_controller/rtp/control_handler.h index e3450f3eb1..9cce0d72bf 100644 --- a/modules/congestion_controller/rtp/control_handler.h +++ b/modules/congestion_controller/rtp/control_handler.h @@ -20,7 +20,6 @@ #include "modules/pacing/paced_sender.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { // This is used to observe the network controller state and route calls to @@ -47,7 +46,7 @@ class CongestionControlHandler { const bool disable_pacer_emergency_stop_; int64_t pacer_expected_queue_ms_ = 0; - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequenced_checker_; + SequenceChecker sequenced_checker_; RTC_DISALLOW_COPY_AND_ASSIGN(CongestionControlHandler); }; } // namespace webrtc diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index 765fadaa65..9a9752d73b 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -296,7 +296,6 @@ rtc_library("rtp_rtcp") { "../../rtc_base/experiments:field_trial_parser", "../../rtc_base/synchronization:mutex", "../../rtc_base/synchronization:sequence_checker", - "../../rtc_base/system:no_unique_address", "../../rtc_base/task_utils:pending_task_safety_flag", "../../rtc_base/task_utils:repeating_task", "../../rtc_base/task_utils:to_queued_task", diff --git a/modules/rtp_rtcp/include/flexfec_receiver.h b/modules/rtp_rtcp/include/flexfec_receiver.h index f9bac9c7fa..6df984f85a 100644 --- a/modules/rtp_rtcp/include/flexfec_receiver.h +++ b/modules/rtp_rtcp/include/flexfec_receiver.h @@ -20,7 +20,6 @@ #include "modules/rtp_rtcp/source/forward_error_correction.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread_annotations.h" namespace webrtc { @@ -70,7 +69,7 @@ class FlexfecReceiver { int64_t last_recovered_packet_ms_ RTC_GUARDED_BY(sequence_checker_); FecPacketCounter packet_counter_ RTC_GUARDED_BY(sequence_checker_); - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; }; } // namespace webrtc diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h index d93e72b286..9eb7e3a6d6 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h @@ -37,7 +37,6 @@ #include "rtc_base/gtest_prod_util.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_utils/pending_task_safety_flag.h" #include "rtc_base/task_utils/repeating_task.h" @@ -293,7 +292,7 @@ class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface, void PeriodicUpdate(); TaskQueueBase* const worker_queue_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker process_thread_checker_; + SequenceChecker process_thread_checker_; std::unique_ptr rtp_sender_; diff --git a/modules/rtp_rtcp/source/rtp_sender_egress.h b/modules/rtp_rtcp/source/rtp_sender_egress.h index d7d71e2f1f..8e36425f29 100644 --- a/modules/rtp_rtcp/source/rtp_sender_egress.h +++ b/modules/rtp_rtcp/source/rtp_sender_egress.h @@ -30,7 +30,6 @@ #include "rtc_base/rate_statistics.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_utils/pending_task_safety_flag.h" #include "rtc_base/task_utils/repeating_task.h" #include "rtc_base/thread_annotations.h" @@ -128,7 +127,7 @@ class RtpSenderEgress { void PeriodicUpdate(); TaskQueueBase* const worker_queue_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker pacer_checker_; + SequenceChecker pacer_checker_; const uint32_t ssrc_; const absl::optional rtx_ssrc_; const absl::optional flexfec_ssrc_; diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index c02f0a8fdf..7cbd1fc8ff 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -110,7 +110,6 @@ rtc_library("video_coding") { "../../api/video:video_bitrate_allocation", "../../api/video:video_bitrate_allocator_factory", "../../rtc_base:deprecation", - "../../rtc_base/system:no_unique_address", "../../rtc_base/task_utils:to_queued_task", "../../system_wrappers:field_trial", "../../system_wrappers:metrics", @@ -354,7 +353,6 @@ rtc_library("video_coding_utility") { "../../rtc_base/synchronization:sequence_checker", "../../rtc_base/system:arch", "../../rtc_base/system:file_wrapper", - "../../rtc_base/system:no_unique_address", "../../rtc_base/task_utils:repeating_task", "../../rtc_base/task_utils:to_queued_task", "../../system_wrappers:field_trial", @@ -709,7 +707,6 @@ if (rtc_include_tests) { "../../rtc_base:rtc_task_queue", "../../rtc_base/synchronization:mutex", "../../rtc_base/synchronization:sequence_checker", - "../../rtc_base/system:no_unique_address", "../../rtc_base/task_utils:to_queued_task", "../../test:test_support", "../../test:video_test_common", diff --git a/modules/video_coding/codecs/test/videoprocessor.h b/modules/video_coding/codecs/test/videoprocessor.h index 3d9a469ee5..a1c96c6da8 100644 --- a/modules/video_coding/codecs/test/videoprocessor.h +++ b/modules/video_coding/codecs/test/videoprocessor.h @@ -37,7 +37,6 @@ #include "rtc_base/checks.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/thread_checker.h" #include "test/testsupport/frame_reader.h" @@ -250,7 +249,7 @@ class VideoProcessor { int64_t post_encode_time_ns_ RTC_GUARDED_BY(sequence_checker_); // This class must be operated on a TaskQueue. - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; RTC_DISALLOW_COPY_AND_ASSIGN(VideoProcessor); }; diff --git a/modules/video_coding/frame_buffer2.h b/modules/video_coding/frame_buffer2.h index dd0eabfa0d..746773d632 100644 --- a/modules/video_coding/frame_buffer2.h +++ b/modules/video_coding/frame_buffer2.h @@ -28,7 +28,6 @@ #include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" #include "rtc_base/task_utils/repeating_task.h" #include "rtc_base/thread_annotations.h" @@ -160,8 +159,8 @@ class FrameBuffer { EncodedFrame* CombineAndDeleteFrames( const std::vector& frames) const; - RTC_NO_UNIQUE_ADDRESS SequenceChecker construction_checker_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker callback_checker_; + SequenceChecker construction_checker_; + SequenceChecker callback_checker_; // Stores only undecoded frames. FrameMap frames_ RTC_GUARDED_BY(mutex_); diff --git a/modules/video_coding/loss_notification_controller.h b/modules/video_coding/loss_notification_controller.h index 06e193b557..a7a1fb9fe8 100644 --- a/modules/video_coding/loss_notification_controller.h +++ b/modules/video_coding/loss_notification_controller.h @@ -19,7 +19,6 @@ #include "api/array_view.h" #include "modules/include/module_common_types.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { @@ -103,7 +102,7 @@ class LossNotificationController { // (Naturally, later frames must also be assemblable to be decodable.) std::set decodable_frame_ids_ RTC_GUARDED_BY(sequence_checker_); - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; }; } // namespace webrtc diff --git a/modules/video_coding/utility/quality_scaler.h b/modules/video_coding/utility/quality_scaler.h index 987d49f1a8..28f225f397 100644 --- a/modules/video_coding/utility/quality_scaler.h +++ b/modules/video_coding/utility/quality_scaler.h @@ -24,7 +24,6 @@ #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" namespace webrtc { @@ -83,7 +82,7 @@ class QualityScaler { std::unique_ptr pending_qp_task_ RTC_GUARDED_BY(&task_checker_); QualityScalerQpUsageHandlerInterface* const handler_ RTC_GUARDED_BY(&task_checker_); - RTC_NO_UNIQUE_ADDRESS SequenceChecker task_checker_; + SequenceChecker task_checker_; VideoEncoder::QpThresholds thresholds_ RTC_GUARDED_BY(&task_checker_); const int64_t sampling_period_ms_; diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn index a376c74f89..76c8273fba 100644 --- a/p2p/BUILD.gn +++ b/p2p/BUILD.gn @@ -100,7 +100,6 @@ rtc_library("rtc_p2p") { "../rtc_base:rtc_numerics", "../rtc_base/experiments:field_trial_parser", "../rtc_base/synchronization:sequence_checker", - "../rtc_base/system:no_unique_address", # Needed by pseudo_tcp, which should move to a separate target. "../rtc_base:safe_minmax", diff --git a/p2p/base/dtls_transport.h b/p2p/base/dtls_transport.h index 5c8a721d03..430c912330 100644 --- a/p2p/base/dtls_transport.h +++ b/p2p/base/dtls_transport.h @@ -25,7 +25,6 @@ #include "rtc_base/stream.h" #include "rtc_base/strings/string_builder.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread_checker.h" namespace rtc { @@ -56,7 +55,7 @@ class StreamInterfaceChannel : public rtc::StreamInterface { int* error) override; private: - RTC_NO_UNIQUE_ADDRESS webrtc::SequenceChecker sequence_checker_; + webrtc::SequenceChecker sequence_checker_; IceTransportInternal* const ice_transport_; // owned by DtlsTransport rtc::StreamState state_ RTC_GUARDED_BY(sequence_checker_); rtc::BufferQueue packets_ RTC_GUARDED_BY(sequence_checker_); diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 04a778140b..aac6d2ea9c 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -275,7 +275,6 @@ rtc_library("peerconnection") { "../rtc_base/synchronization:mutex", "../rtc_base/synchronization:sequence_checker", "../rtc_base/system:file_wrapper", - "../rtc_base/system:no_unique_address", "../rtc_base/system:rtc_export", "../rtc_base/task_utils:pending_task_safety_flag", "../rtc_base/task_utils:to_queued_task", diff --git a/pc/video_rtp_track_source.h b/pc/video_rtp_track_source.h index 9903aaa232..b887849312 100644 --- a/pc/video_rtp_track_source.h +++ b/pc/video_rtp_track_source.h @@ -17,7 +17,6 @@ #include "pc/video_track_source.h" #include "rtc_base/callback.h" #include "rtc_base/synchronization/mutex.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { @@ -68,7 +67,7 @@ class VideoRtpTrackSource : public VideoTrackSource { rtc::VideoSinkInterface* sink) override; private: - RTC_NO_UNIQUE_ADDRESS SequenceChecker worker_sequence_checker_; + SequenceChecker worker_sequence_checker_; // |broadcaster_| is needed since the decoder can only handle one sink. // It might be better if the decoder can handle multiple sinks and consider // the VideoSinkWants. diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index 49008a2ae3..3383580492 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -75,7 +75,6 @@ rtc_library("rtc_base_approved") { "../api:scoped_refptr", "synchronization:mutex", "system:arch", - "system:no_unique_address", "system:rtc_export", "system:unused", "third_party/base64", @@ -479,7 +478,6 @@ rtc_source_set("rtc_operations_chain") { ":refcount", "../api:scoped_refptr", "synchronization:sequence_checker", - "system:no_unique_address", ] absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] } @@ -583,7 +581,6 @@ rtc_library("weak_ptr") { ":refcount", "../api:scoped_refptr", "synchronization:sequence_checker", - "system:no_unique_address", ] } @@ -832,7 +829,6 @@ rtc_library("rtc_base") { "synchronization:sequence_checker", "system:file_wrapper", "system:inline", - "system:no_unique_address", "system:rtc_export", "task_utils:pending_task_safety_flag", "task_utils:repeating_task", diff --git a/rtc_base/buffer_queue.h b/rtc_base/buffer_queue.h index 5895530969..24a9b04dc2 100644 --- a/rtc_base/buffer_queue.h +++ b/rtc_base/buffer_queue.h @@ -19,7 +19,6 @@ #include "rtc_base/buffer.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread_annotations.h" namespace rtc { @@ -56,7 +55,7 @@ class BufferQueue final { } private: - RTC_NO_UNIQUE_ADDRESS webrtc::SequenceChecker sequence_checker_; + webrtc::SequenceChecker sequence_checker_; const size_t capacity_; const size_t default_size_; std::deque queue_ RTC_GUARDED_BY(sequence_checker_); diff --git a/rtc_base/net_helpers.h b/rtc_base/net_helpers.h index 172a222456..c6aa4be5b2 100644 --- a/rtc_base/net_helpers.h +++ b/rtc_base/net_helpers.h @@ -23,7 +23,6 @@ #include "rtc_base/ip_address.h" #include "rtc_base/socket_address.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/system/rtc_export.h" #include "rtc_base/task_utils/pending_task_safety_flag.h" #include "rtc_base/thread.h" @@ -63,7 +62,7 @@ class RTC_EXPORT AsyncResolver : public AsyncResolverInterface { bool recursion_check_ = false; // Protects against SignalDone calling into Destroy. bool destroy_called_ = false; - RTC_NO_UNIQUE_ADDRESS webrtc::SequenceChecker sequence_checker_; + webrtc::SequenceChecker sequence_checker_; }; // rtc namespaced wrappers for inet_ntop and inet_pton so we can avoid diff --git a/rtc_base/operations_chain.h b/rtc_base/operations_chain.h index a7252d46f0..44a3d9acb8 100644 --- a/rtc_base/operations_chain.h +++ b/rtc_base/operations_chain.h @@ -25,7 +25,6 @@ #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace rtc { @@ -184,7 +183,7 @@ class OperationsChain final : public RefCountedObject { std::function CreateOperationsChainCallback(); void OnOperationComplete(); - RTC_NO_UNIQUE_ADDRESS webrtc::SequenceChecker sequence_checker_; + webrtc::SequenceChecker sequence_checker_; // FIFO-list of operations that are chained. An operation that is executing // remains on this list until it has completed by invoking the callback passed // to it. diff --git a/rtc_base/system/BUILD.gn b/rtc_base/system/BUILD.gn index 9f83c629e2..bf8cf94e3a 100644 --- a/rtc_base/system/BUILD.gn +++ b/rtc_base/system/BUILD.gn @@ -55,10 +55,6 @@ rtc_source_set("rtc_export") { ] } -rtc_source_set("no_unique_address") { - sources = [ "no_unique_address.h" ] -} - if (is_mac || is_ios) { rtc_library("cocoa_threading") { sources = [ diff --git a/rtc_base/system/no_unique_address.h b/rtc_base/system/no_unique_address.h deleted file mode 100644 index 346940d2b4..0000000000 --- a/rtc_base/system/no_unique_address.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef RTC_BASE_SYSTEM_NO_UNIQUE_ADDRESS_H_ -#define RTC_BASE_SYSTEM_NO_UNIQUE_ADDRESS_H_ - -// RTC_NO_UNIQUE_ADDRESS is a portable annotation to tell the compiler that -// a data member need not have an address distinct from all other non-static -// data members of its class. -// It allows empty types to actually occupy zero bytes as class members, -// instead of occupying at least one byte just so that they get their own -// address. There is almost never any reason not to use it on class members -// that could possibly be empty. -// The macro expands to [[no_unique_address]] if the compiler supports the -// attribute, it expands to nothing otherwise. -// Clang should supports this attribute since C++11, while other compilers -// should add support for it starting from C++20. Among clang compilers, -// clang-cl doesn't support it yet and support is unclear also when the target -// platform is iOS. -#if (defined(__clang__) && !defined(_MSC_VER) && !defined(WEBRTC_IOS)) || \ - __cplusplus > 201703L -// NOLINTNEXTLINE(whitespace/braces) -#define RTC_NO_UNIQUE_ADDRESS [[no_unique_address]] -#else -#define RTC_NO_UNIQUE_ADDRESS -#endif - -#endif // RTC_BASE_SYSTEM_NO_UNIQUE_ADDRESS_H_ diff --git a/rtc_base/task_utils/BUILD.gn b/rtc_base/task_utils/BUILD.gn index 018844fe65..54f9a048f0 100644 --- a/rtc_base/task_utils/BUILD.gn +++ b/rtc_base/task_utils/BUILD.gn @@ -38,7 +38,6 @@ rtc_library("pending_task_safety_flag") { "..:thread_checker", "../../api:scoped_refptr", "../synchronization:sequence_checker", - "../system:no_unique_address", ] } diff --git a/rtc_base/task_utils/pending_task_safety_flag.h b/rtc_base/task_utils/pending_task_safety_flag.h index 182db2cbbc..580fb3f912 100644 --- a/rtc_base/task_utils/pending_task_safety_flag.h +++ b/rtc_base/task_utils/pending_task_safety_flag.h @@ -15,7 +15,6 @@ #include "rtc_base/checks.h" #include "rtc_base/ref_count.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { @@ -59,7 +58,7 @@ class PendingTaskSafetyFlag : public rtc::RefCountInterface { private: bool alive_ = true; - RTC_NO_UNIQUE_ADDRESS SequenceChecker main_sequence_; + SequenceChecker main_sequence_; }; // Makes using PendingTaskSafetyFlag very simple. Automatic PTSF creation diff --git a/rtc_base/weak_ptr.h b/rtc_base/weak_ptr.h index 68d57fc557..8b2ba099cb 100644 --- a/rtc_base/weak_ptr.h +++ b/rtc_base/weak_ptr.h @@ -18,7 +18,6 @@ #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" // The implementation is borrowed from chromium except that it does not // implement SupportsWeakPtr. @@ -104,7 +103,7 @@ class WeakReference { ~Flag() override; - RTC_NO_UNIQUE_ADDRESS ::webrtc::SequenceChecker checker_; + ::webrtc::SequenceChecker checker_; bool is_valid_; }; diff --git a/rtc_tools/network_tester/BUILD.gn b/rtc_tools/network_tester/BUILD.gn index b270262f0d..ff823806e2 100644 --- a/rtc_tools/network_tester/BUILD.gn +++ b/rtc_tools/network_tester/BUILD.gn @@ -50,7 +50,6 @@ if (rtc_enable_protobuf) { "../../rtc_base:rtc_task_queue", "../../rtc_base/synchronization:mutex", "../../rtc_base/synchronization:sequence_checker", - "../../rtc_base/system:no_unique_address", "../../rtc_base/third_party/sigslot", ] absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] diff --git a/rtc_tools/network_tester/packet_sender.h b/rtc_tools/network_tester/packet_sender.h index c0ea2c1680..ffc1118e20 100644 --- a/rtc_tools/network_tester/packet_sender.h +++ b/rtc_tools/network_tester/packet_sender.h @@ -18,7 +18,6 @@ #include "rtc_base/constructor_magic.h" #include "rtc_base/ignore_wundef.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" #ifdef WEBRTC_NETWORK_TESTER_PROTO @@ -50,7 +49,7 @@ class PacketSender { void UpdateTestSetting(size_t packet_size, int64_t send_interval_ms); private: - RTC_NO_UNIQUE_ADDRESS SequenceChecker worker_queue_checker_; + SequenceChecker worker_queue_checker_; size_t packet_size_ RTC_GUARDED_BY(worker_queue_checker_); int64_t send_interval_ms_ RTC_GUARDED_BY(worker_queue_checker_); int64_t sequence_number_ RTC_GUARDED_BY(worker_queue_checker_); diff --git a/video/BUILD.gn b/video/BUILD.gn index 0e7c37836f..f19588399b 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -130,7 +130,6 @@ rtc_library("video") { "../rtc_base/experiments:rate_control_settings", "../rtc_base/synchronization:mutex", "../rtc_base/synchronization:sequence_checker", - "../rtc_base/system:no_unique_address", "../rtc_base/system:thread_registry", "../rtc_base/task_utils:pending_task_safety_flag", "../rtc_base/task_utils:repeating_task", @@ -256,7 +255,6 @@ rtc_library("video_stream_encoder_impl") { "../rtc_base/experiments:rate_control_settings", "../rtc_base/synchronization:mutex", "../rtc_base/synchronization:sequence_checker", - "../rtc_base/system:no_unique_address", "../rtc_base/task_utils:pending_task_safety_flag", "../rtc_base/task_utils:repeating_task", "../system_wrappers", diff --git a/video/adaptation/BUILD.gn b/video/adaptation/BUILD.gn index 50bba5bb37..2a60eadc5e 100644 --- a/video/adaptation/BUILD.gn +++ b/video/adaptation/BUILD.gn @@ -53,7 +53,6 @@ rtc_library("video_adaptation") { "../../rtc_base/experiments:quality_scaler_settings", "../../rtc_base/synchronization:mutex", "../../rtc_base/synchronization:sequence_checker", - "../../rtc_base/system:no_unique_address", "../../rtc_base/task_utils:repeating_task", "../../rtc_base/task_utils:to_queued_task", "../../system_wrappers:field_trial", diff --git a/video/adaptation/balanced_constraint.h b/video/adaptation/balanced_constraint.h index 15219360f5..5e02408025 100644 --- a/video/adaptation/balanced_constraint.h +++ b/video/adaptation/balanced_constraint.h @@ -18,7 +18,6 @@ #include "call/adaptation/degradation_preference_provider.h" #include "rtc_base/experiments/balanced_degradation_settings.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { @@ -39,7 +38,7 @@ class BalancedConstraint : public AdaptationConstraint { const VideoSourceRestrictions& restrictions_after) const override; private: - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; absl::optional encoder_target_bitrate_bps_ RTC_GUARDED_BY(&sequence_checker_); const BalancedDegradationSettings balanced_settings_; diff --git a/video/adaptation/bitrate_constraint.h b/video/adaptation/bitrate_constraint.h index 6fefb04c24..015edcc13f 100644 --- a/video/adaptation/bitrate_constraint.h +++ b/video/adaptation/bitrate_constraint.h @@ -19,7 +19,6 @@ #include "call/adaptation/video_source_restrictions.h" #include "call/adaptation/video_stream_input_state.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { @@ -41,7 +40,7 @@ class BitrateConstraint : public AdaptationConstraint { const VideoSourceRestrictions& restrictions_after) const override; private: - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; absl::optional encoder_settings_ RTC_GUARDED_BY(&sequence_checker_); absl::optional encoder_target_bitrate_bps_ diff --git a/video/adaptation/overuse_frame_detector.h b/video/adaptation/overuse_frame_detector.h index c9095d63a5..16217fff84 100644 --- a/video/adaptation/overuse_frame_detector.h +++ b/video/adaptation/overuse_frame_detector.h @@ -21,7 +21,6 @@ #include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/numerics/exp_filter.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_utils/repeating_task.h" #include "rtc_base/thread_annotations.h" @@ -135,7 +134,7 @@ class OveruseFrameDetector { static std::unique_ptr CreateProcessingUsage( const CpuOveruseOptions& options); - RTC_NO_UNIQUE_ADDRESS SequenceChecker task_checker_; + SequenceChecker task_checker_; // Owned by the task queue from where StartCheckForOveruse is called. RepeatingTaskHandle check_overuse_task_ RTC_GUARDED_BY(task_checker_); diff --git a/video/call_stats2.h b/video/call_stats2.h index 30e8263e2f..822685320f 100644 --- a/video/call_stats2.h +++ b/video/call_stats2.h @@ -19,7 +19,6 @@ #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" #include "rtc_base/task_utils/pending_task_safety_flag.h" #include "rtc_base/task_utils/repeating_task.h" @@ -133,8 +132,8 @@ class CallStats { // for the observers_ list, which makes the most common case lock free. std::list observers_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker construction_thread_checker_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker process_thread_checker_; + SequenceChecker construction_thread_checker_; + SequenceChecker process_thread_checker_; TaskQueueBase* const task_queue_; // Used to signal destruction to potentially pending tasks. diff --git a/video/receive_statistics_proxy2.h b/video/receive_statistics_proxy2.h index e9950c5e84..1357c407ad 100644 --- a/video/receive_statistics_proxy2.h +++ b/video/receive_statistics_proxy2.h @@ -28,7 +28,6 @@ #include "rtc_base/rate_statistics.h" #include "rtc_base/rate_tracker.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_utils/pending_task_safety_flag.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/thread_checker.h" @@ -214,9 +213,9 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback, ScopedTaskSafety task_safety_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker decode_queue_; + SequenceChecker decode_queue_; rtc::ThreadChecker main_thread_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker incoming_render_queue_; + SequenceChecker incoming_render_queue_; }; } // namespace internal diff --git a/video/rtp_streams_synchronizer2.h b/video/rtp_streams_synchronizer2.h index 3d31738225..6a522e801d 100644 --- a/video/rtp_streams_synchronizer2.h +++ b/video/rtp_streams_synchronizer2.h @@ -14,7 +14,6 @@ #include #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" #include "rtc_base/task_utils/repeating_task.h" #include "video/stream_synchronization.h" @@ -55,7 +54,7 @@ class RtpStreamsSynchronizer { // we might be running on an rtc::Thread implementation of TaskQueue, which // does not consistently set itself as the active TaskQueue. // Instead, we rely on a SequenceChecker for now. - RTC_NO_UNIQUE_ADDRESS SequenceChecker main_checker_; + SequenceChecker main_checker_; Syncable* const syncable_video_; diff --git a/video/rtp_video_stream_receiver.h b/video/rtp_video_stream_receiver.h index 40958c48ec..2c4342dd7d 100644 --- a/video/rtp_video_stream_receiver.h +++ b/video/rtp_video_stream_receiver.h @@ -46,7 +46,6 @@ #include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/thread_checker.h" #include "video/buffered_frame_decryptor.h" @@ -324,7 +323,7 @@ class RtpVideoStreamReceiver : public LossNotificationSender, ReceiveStatistics* const rtp_receive_statistics_; std::unique_ptr ulpfec_receiver_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker worker_task_checker_; + SequenceChecker worker_task_checker_; bool receiving_ RTC_GUARDED_BY(worker_task_checker_); int64_t last_packet_log_ms_ RTC_GUARDED_BY(worker_task_checker_); diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h index 40e7ef6f1b..fb31328629 100644 --- a/video/rtp_video_stream_receiver2.h +++ b/video/rtp_video_stream_receiver2.h @@ -43,7 +43,6 @@ #include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread_annotations.h" #include "video/buffered_frame_decryptor.h" #include "video/rtp_video_stream_receiver_frame_transformer_delegate.h" @@ -234,7 +233,7 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, bool decodability_flag; }; - RTC_NO_UNIQUE_ADDRESS SequenceChecker worker_task_checker_; + SequenceChecker worker_task_checker_; KeyFrameRequestSender* const key_frame_request_sender_; NackSender* const nack_sender_; LossNotificationSender* const loss_notification_sender_; @@ -287,7 +286,7 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, ReceiveStatistics* const rtp_receive_statistics_; std::unique_ptr ulpfec_receiver_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker worker_task_checker_; + SequenceChecker worker_task_checker_; bool receiving_ RTC_GUARDED_BY(worker_task_checker_); int64_t last_packet_log_ms_ RTC_GUARDED_BY(worker_task_checker_); diff --git a/video/rtp_video_stream_receiver_frame_transformer_delegate.h b/video/rtp_video_stream_receiver_frame_transformer_delegate.h index 2ae8e63bba..e687e7f47b 100644 --- a/video/rtp_video_stream_receiver_frame_transformer_delegate.h +++ b/video/rtp_video_stream_receiver_frame_transformer_delegate.h @@ -16,7 +16,6 @@ #include "api/frame_transformer_interface.h" #include "modules/video_coding/frame_object.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread.h" namespace webrtc { @@ -62,7 +61,7 @@ class RtpVideoStreamReceiverFrameTransformerDelegate ~RtpVideoStreamReceiverFrameTransformerDelegate() override = default; private: - RTC_NO_UNIQUE_ADDRESS SequenceChecker network_sequence_checker_; + SequenceChecker network_sequence_checker_; RtpVideoFrameReceiver* receiver_ RTC_GUARDED_BY(network_sequence_checker_); rtc::scoped_refptr frame_transformer_ RTC_GUARDED_BY(network_sequence_checker_); diff --git a/video/video_receive_stream.h b/video/video_receive_stream.h index 5e52063536..5fb9cf72da 100644 --- a/video/video_receive_stream.h +++ b/video/video_receive_stream.h @@ -25,7 +25,6 @@ #include "modules/video_coding/video_receiver2.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" #include "system_wrappers/include/clock.h" #include "video/receive_statistics_proxy.h" @@ -151,9 +150,9 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream, void UpdateHistograms(); - RTC_NO_UNIQUE_ADDRESS SequenceChecker worker_sequence_checker_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker module_process_sequence_checker_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker network_sequence_checker_; + SequenceChecker worker_sequence_checker_; + SequenceChecker module_process_sequence_checker_; + SequenceChecker network_sequence_checker_; TaskQueueFactory* const task_queue_factory_; diff --git a/video/video_receive_stream2.h b/video/video_receive_stream2.h index d83a10e691..9b152f420a 100644 --- a/video/video_receive_stream2.h +++ b/video/video_receive_stream2.h @@ -25,7 +25,6 @@ #include "modules/video_coding/frame_buffer2.h" #include "modules/video_coding/video_receiver2.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/task_queue.h" #include "rtc_base/task_utils/pending_task_safety_flag.h" #include "system_wrappers/include/clock.h" @@ -178,8 +177,8 @@ class VideoReceiveStream2 : public webrtc::VideoReceiveStream, void UpdateHistograms(); - RTC_NO_UNIQUE_ADDRESS SequenceChecker worker_sequence_checker_; - RTC_NO_UNIQUE_ADDRESS SequenceChecker module_process_sequence_checker_; + SequenceChecker worker_sequence_checker_; + SequenceChecker module_process_sequence_checker_; TaskQueueFactory* const task_queue_factory_; diff --git a/video/video_source_sink_controller.h b/video/video_source_sink_controller.h index 134366cfd0..ed8f990970 100644 --- a/video/video_source_sink_controller.h +++ b/video/video_source_sink_controller.h @@ -19,7 +19,6 @@ #include "api/video/video_source_interface.h" #include "call/adaptation/video_source_restrictions.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" namespace webrtc { @@ -63,7 +62,7 @@ class VideoSourceSinkController { // Used to ensure that this class is called on threads/sequences that it and // downstream implementations were designed for. // In practice, this represent's libjingle's worker thread. - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; rtc::VideoSinkInterface* const sink_; rtc::VideoSourceInterface* source_ diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc index 234a26a56f..e7bc15bb0a 100644 --- a/video/video_stream_encoder.cc +++ b/video/video_stream_encoder.cc @@ -41,7 +41,6 @@ #include "rtc_base/logging.h" #include "rtc_base/strings/string_builder.h" #include "rtc_base/synchronization/sequence_checker.h" -#include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/trace_event.h" #include "system_wrappers/include/field_trial.h" @@ -275,7 +274,7 @@ class VideoStreamEncoder::DegradationPreferenceManager } } - RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; + SequenceChecker sequence_checker_; DegradationPreference degradation_preference_ RTC_GUARDED_BY(&sequence_checker_); bool is_screenshare_ RTC_GUARDED_BY(&sequence_checker_);