| Summary: | Migrate to libwebrtc non-racy setRemoteDescription/setLocalDescription variants | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||
| Component: | WebRTC | Assignee: | youenn fablet <youennf> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | darin, eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
youenn fablet
2021-09-14 06:20:48 PDT
Created attachment 438129 [details]
Patch
Created attachment 438150 [details]
Patch
Comment on attachment 438150 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438150&action=review > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:148 > + rtc::scoped_refptr<webrtc::SetLocalDescriptionObserverInterface> observer(&m_setLocalSessionDescriptionObserver); I wonder if we can leave out the <> here. If it was std::unique_ptr or WTF::RefPtr we could, but not sure about rtc::scoped_refptr. > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:182 > + rtc::scoped_refptr<webrtc::SetRemoteDescriptionObserverInterface> observer(&m_setRemoteSessionDescriptionObserver); Ditto. > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCObservers.h:69 > + void OnSetLocalDescriptionComplete(webrtc::RTCError error) final Not important, but seems like this can be private. > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCObservers.h:93 > + void OnSetRemoteDescriptionComplete(webrtc::RTCError error) final Not important, but seems like this can be private. (In reply to Darin Adler from comment #3) > Comment on attachment 438150 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=438150&action=review > > > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:148 > > + rtc::scoped_refptr<webrtc::SetLocalDescriptionObserverInterface> observer(&m_setLocalSessionDescriptionObserver); > > I wonder if we can leave out the <> here. If it was std::unique_ptr or > WTF::RefPtr we could, but not sure about rtc::scoped_refptr. We indeed can do it. Thinking more about it, given the typed parameters, we can probably just pass a pointer to the methods and the scoped_refptr will be created for us. > > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:182 > > + rtc::scoped_refptr<webrtc::SetRemoteDescriptionObserverInterface> observer(&m_setRemoteSessionDescriptionObserver); > > Ditto. > > > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCObservers.h:69 > > + void OnSetLocalDescriptionComplete(webrtc::RTCError error) final > > Not important, but seems like this can be private. OK. > > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCObservers.h:93 > > + void OnSetRemoteDescriptionComplete(webrtc::RTCError error) final > > Not important, but seems like this can be private. OK. Created attachment 438219 [details]
Patch for landing
Committed r282444 (241697@main): <https://commits.webkit.org/241697@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 438219 [details]. |