Bailing out if pc factory fails to get created.

This prevents us from continuing if we fail initialization.
The failure will happen closer to its source, rather than
when we try to create the first peer connection.

BUG=None
R=glaznev@webrtc.org

Review URL: https://codereview.webrtc.org/1339923004 .

Cr-Commit-Position: refs/heads/master@{#9948}
This commit is contained in:
Patrik Höglund
2015-09-16 08:41:31 +02:00
parent 2338fec627
commit 6eb75d9e67

View File

@ -1103,6 +1103,8 @@ JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnectionFactory)(
NULL,
encoder_factory,
decoder_factory));
CHECK(factory) << "Failed to create the peer connection factory; "
<< "WebRTC/libjingle init likely failed on this device";
OwnedFactoryAndThreads* owned_factory = new OwnedFactoryAndThreads(
worker_thread, signaling_thread,
encoder_factory, decoder_factory,