Add logging in case libwebrtc.dylib cannot be opened
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Mar 2017 20:20:10 +0000 (20:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Mar 2017 20:20:10 +0000 (20:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170017

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-23
Reviewed by Geoffrey Garen.

No change of behavior.

* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::webRTCAvailable):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@214312 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp

index 0af0cc9..aa5b0d8 100644 (file)
@@ -1,3 +1,15 @@
+2017-03-23  Youenn Fablet  <youenn@apple.com>
+
+        Add logging in case libwebrtc.dylib cannot be opened
+        https://bugs.webkit.org/show_bug.cgi?id=170017
+
+        Reviewed by Geoffrey Garen.
+
+        No change of behavior.
+
+        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
+        (WebCore::LibWebRTCProvider::webRTCAvailable):
+
 2017-03-23  Jiewen Tan  <jiewen_tan@apple.com>
 
         Unreviewed, a speculative build fix
index 08fecb0..f6fcacf 100644 (file)
@@ -177,8 +177,10 @@ bool LibWebRTCProvider::webRTCAvailable()
 #if USE(LIBWEBRTC)
     static bool available = [] {
         void* libwebrtcLibrary = dlopen("libwebrtc.dylib", RTLD_LAZY);
-        if (!libwebrtcLibrary)
+        if (!libwebrtcLibrary) {
+            RELEASE_LOG(WebRTC, "Attempted to load libwebrtc without success: %s", dlerror());
             return false;
+        }
         dlclose(libwebrtcLibrary);
         return true;
     }();