<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>278436</bug_id>
          
          <creation_ts>2024-08-20 18:06:54 -0700</creation_ts>
          <short_desc>[WebRTC] Ignore -Wthread-safety-reference-return warnings in libwebrtc headers</short_desc>
          <delta_ts>2024-08-21 18:11:08 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebRTC</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>274508</dependson>
          <blocked>274536</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="David Kilzer (:ddkilzer)">ddkilzer</assigned_to>
          <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2054295</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2024-08-20 18:06:54 -0700</bug_when>
    <thetext>Ignore -Wthread-safety-reference-return warnings in libwebrtc headers.

This is follow-on work for Bug 274508: Disable thread-safety-reference-return warnings in libwebrtc.

Example warnings:

In file included from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:32:
In file included from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h:38:
In file included from WebKitBuild/Release/usr/local/include/webrtc/api/peer_connection_interface.h:135:
In file included from WebKitBuild/Release/usr/local/include/webrtc/p2p/base/port.h:41:
WebKitBuild/Release/usr/local/include/webrtc/p2p/base/connection.h:307:12: error: returning variable &apos;rtt_estimate_&apos; by reference requires holding mutex &apos;network_thread_&apos; [-Werror,-Wthread-safety-reference-return]
  307 |     return rtt_estimate_;
      |            ^
In file included from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:32:
In file included from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h:38:
In file included from WebKitBuild/Release/usr/local/include/webrtc/api/peer_connection_interface.h:135:
WebKitBuild/Release/usr/local/include/webrtc/p2p/base/port.h:253:48: error: returning variable &apos;password_&apos; by reference requires holding mutex &apos;thread_&apos; [-Werror,-Wthread-safety-reference-return]
  253 |   const std::string&amp; password() const { return password_; }
      |                                                ^
2 errors generated.


In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource363.cpp:2:
In file included from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:52:
WebKitBuild/Release/usr/local/include/webrtc/pc/peer_connection_factory.h:108:12: error: returning variable &apos;options_&apos; by reference requires holding mutex &apos;signaling_thread()&apos; [-Werror,-Wthread-safety-reference-return]
  108 |     return options_;
      |            ^
1 error generated.


In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource65.cpp:8:
In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:26:
In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:37:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/rtc_stats_collector.h:33:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/peer_connection_internal.h:24:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/jsep_transport_controller.h:45:
WebKitBuild/Release/usr/local/include/webrtc/p2p/base/p2p_transport_channel.h:194:12: error: returning variable &apos;ports_&apos; by reference requires holding mutex &apos;network_thread_&apos; [-Werror,-Wthread-safety-reference-return]
  194 |     return ports_;
      |            ^
WebKitBuild/Release/usr/local/include/webrtc/p2p/base/p2p_transport_channel.h:198:12: error: returning variable &apos;pruned_ports_&apos; by reference requires holding mutex &apos;network_thread_&apos; [-Werror,-Wthread-safety-reference-return]
  198 |     return pruned_ports_;
      |            ^
WebKitBuild/Release/usr/local/include/webrtc/p2p/base/p2p_transport_channel.h:235:12: error: returning variable &apos;remote_candidates_&apos; by reference requires holding mutex &apos;network_thread_&apos; [-Werror,-Wthread-safety-reference-return]
  235 |     return remote_candidates_;
      |            ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource65.cpp:8:
In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:26:
In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:37:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/rtc_stats_collector.h:33:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/peer_connection_internal.h:24:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/jsep_transport_controller.h:54:
WebKitBuild/Release/usr/local/include/webrtc/pc/jsep_transport_collection.h:51:12: error: returning variable &apos;bundle_groups_&apos; by reference requires holding mutex &apos;sequence_checker_&apos; [-Werror,-Wthread-safety-reference-return]
   51 |     return bundle_groups_;
      |            ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource65.cpp:8:
In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:26:
In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:37:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/rtc_stats_collector.h:33:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/peer_connection_internal.h:27:
In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/rtp_transmission_manager.h:36:
WebKitBuild/Release/usr/local/include/webrtc/pc/transceiver_list.h:142:12: error: returning variable &apos;transceiver_stable_states_by_transceivers_&apos; by reference requires holding mutex &apos;sequence_checker_&apos; exclusively [-Werror,-Wthread-safety-reference-return]
  142 |     return transceiver_stable_states_by_transceivers_;
      |            ^
5 errors generated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2054296</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-08-20 18:07:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/134381989&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2054299</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2024-08-20 18:13:24 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/32500</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2054586</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2024-08-21 18:11:08 -0700</bug_when>
    <thetext>Committed 282595@main (b6c925c): https://commits.webkit.org/282595@main

Reviewed commits have been landed. Closing PR #32500 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>