Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm

Issue 1978233002: Polishing code to handle certificate generation failure in .mm files. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed nits Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
index 57c678032a19be0c489a9fad4a00895f9efdbd25..15b34c3f2d3cee7201f32509048cf6ee90f5fb12 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
@@ -198,9 +198,10 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
delegate:(id<RTCPeerConnectionDelegate>)delegate {
NSParameterAssert(factory);
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config(
- configuration.nativeConfiguration);
- if (!config)
- return nullptr;
+ [configuration createNativeConfiguration]);
+ if (!config) {
+ return nil;
+ }
if (self = [super init]) {
_observer.reset(new webrtc::PeerConnectionDelegateAdapter(self));
std::unique_ptr<webrtc::MediaConstraints> nativeConstraints =
@@ -254,9 +255,10 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
- (BOOL)setConfiguration:(RTCConfiguration *)configuration {
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config(
- configuration.nativeConfiguration);
- if (!config)
- return false;
+ [configuration createNativeConfiguration]);
+ if (!config) {
+ return NO;
+ }
return _peerConnection->SetConfiguration(*config);
}

Powered by Google App Engine
This is Rietveld 408576698