Bug 246634 - AudioSourceProviderAVFObjC::m_client should be Weak
Summary: AudioSourceProviderAVFObjC::m_client should be Weak
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-17 09:14 PDT by Jer Noble
Modified: 2022-10-19 15:26 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2022-10-17 09:14:00 PDT
AudioSourceProviderAVFObjC::m_client should be Weak
Comment 1 Jer Noble 2022-10-17 09:14:11 PDT
<rdar://problem/100804084>
Comment 2 Jer Noble 2022-10-17 09:21:31 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5446
Comment 3 EWS 2022-10-19 11:26:40 PDT
Committed 255745@main (9290cdbf360c): <https://commits.webkit.org/255745@main>

Reviewed commits have been landed. Closing PR #5446 and removing active labels.
Comment 4 Michael Catanzaro 2022-10-19 12:35:47 PDT
This introduced a bug in a debug print:

[1072/2475] Building CXX object Source/WebCore/CMakeFiles...atform/audio/gstreamer/AudioSourceProviderGStreamer.cpp.o
In file included from /usr/include/gstreamer-1.0/gst/gst.h:55,
                 from /home/mcatanzaro/Projects/WebKit/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h:24,
                 from /home/mcatanzaro/Projects/WebKit/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.h:25,
                 from /home/mcatanzaro/Projects/WebKit/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:20:
/home/mcatanzaro/Projects/WebKit/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp: In member function ‘virtual void WebCore::AudioSourceProviderGStreamer::setClient(WTF::WeakPtr<WebCore::AudioSourceProviderClient>&&)’:
/home/mcatanzaro/Projects/WebKit/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:257:40: warning: format ‘%p’ expects argument of type ‘void*’, but argument 8 has type ‘WTF::WeakPtr<WebCore::AudioSourceProviderClient>’ [-Wformat=]
  257 |     GST_DEBUG_OBJECT(m_pipeline.get(), "Setting up client %p (previous: %p)", newClient, client());
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mcatanzaro/Projects/WebKit/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:257:60: note: format string is defined here
  257 |     GST_DEBUG_OBJECT(m_pipeline.get(), "Setting up client %p (previous: %p)", newClient, client());
      |                                                           ~^
      |                                                            |
      |                                                            void*

I will submit a follow-up.
Comment 5 Michael Catanzaro 2022-10-19 13:01:30 PDT
Re-opening for pull request https://github.com/WebKit/WebKit/pull/5553
Comment 6 EWS 2022-10-19 15:26:55 PDT
Committed 255761@main (e54634760b76): <https://commits.webkit.org/255761@main>

Reviewed commits have been landed. Closing PR #5553 and removing active labels.