WebKit Bugzilla
Attachment 356943 Details for
Bug 192545
: MockLibWebRTCPeerConnectionFactory should isolate copy its test case
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192545-20181209210013.patch (text/plain), 3.46 KB, created by
youenn fablet
on 2018-12-09 21:00:16 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-12-09 21:00:16 PST
Size:
3.46 KB
patch
obsolete
>Subversion Revision: 239012 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3a739834ba83b059e046e27c19a0fc795cb40a1e..7b0605aa6cc427fd3b7d346e9efe6367554f69b8 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-12-09 Youenn Fablet <youenn@apple.com> >+ >+ MockLibWebRTCPeerConnectionFactory should isolate copy its test case >+ https://bugs.webkit.org/show_bug.cgi?id=192545 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Isolate copy the test case member so that it can be destroyed on another thread. >+ Covered by existing test that should no longer crash. >+ >+ * testing/MockLibWebRTCPeerConnection.cpp: >+ (WebCore::useMockRTCPeerConnectionFactory): >+ (WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory): >+ * testing/MockLibWebRTCPeerConnection.h: >+ (WebCore::MockLibWebRTCPeerConnectionFactory::create): >+ > 2018-12-09 Youenn Fablet <youenn@apple.com> > > Make mock capture happen in the process used for real capture >diff --git a/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp b/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp >index 1597eb71edd5f7c03be86b65b8d914cf02e62e9c..2192b93c279a0f328bd419e1a5c39566cc9f32d0 100644 >--- a/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp >+++ b/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp >@@ -66,7 +66,7 @@ void useMockRTCPeerConnectionFactory(LibWebRTCProvider* provider, const String& > auto& factory = getRealPeerConnectionFactory(); > factory = provider->factory(); > } >- provider->setPeerConnectionFactory(MockLibWebRTCPeerConnectionFactory::create(String(testCase))); >+ provider->setPeerConnectionFactory(MockLibWebRTCPeerConnectionFactory::create(testCase)); > } > > MockLibWebRTCPeerConnection::~MockLibWebRTCPeerConnection() >@@ -167,8 +167,8 @@ private: > void SetLocalDescription(webrtc::SetSessionDescriptionObserver* observer, webrtc::SessionDescriptionInterface*) final { releaseInNetworkThread(*this, *observer); } > }; > >-MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory(String&& testCase) >- : m_testCase(WTFMove(testCase)) >+MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory(const String& testCase) >+ : m_testCase(testCase.isolatedCopy()) > { > } > >diff --git a/Source/WebCore/testing/MockLibWebRTCPeerConnection.h b/Source/WebCore/testing/MockLibWebRTCPeerConnection.h >index 77a2170e317109eb05400445b49356015484c7ed..be3c63f0ff9f5b02b8cdeb0cb313b9e163842f5c 100644 >--- a/Source/WebCore/testing/MockLibWebRTCPeerConnection.h >+++ b/Source/WebCore/testing/MockLibWebRTCPeerConnection.h >@@ -235,10 +235,10 @@ private: > > class MockLibWebRTCPeerConnectionFactory : public webrtc::PeerConnectionFactoryInterface { > public: >- static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> create(String&& testCase) { return new rtc::RefCountedObject<MockLibWebRTCPeerConnectionFactory>(WTFMove(testCase)); } >+ static rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> create(const String& testCase) { return new rtc::RefCountedObject<MockLibWebRTCPeerConnectionFactory>(testCase); } > > protected: >- MockLibWebRTCPeerConnectionFactory(String&&); >+ explicit MockLibWebRTCPeerConnectionFactory(const String&); > > private: > rtc::scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection(const webrtc::PeerConnectionInterface::RTCConfiguration&, webrtc::PeerConnectionDependencies) final;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192545
: 356943