Title: [208139] trunk/Source/WebCore
Revision
208139
Author
[email protected]
Date
2016-10-31 00:53:30 -0700 (Mon, 31 Oct 2016)

Log Message

[OpenWebRTC] Initialize library one time only
https://bugs.webkit.org/show_bug.cgi?id=164118

Reviewed by Darin Adler.

* platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
(WebCore::initializeOpenWebRTC): Prevent multiple initialisations of the library.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (208138 => 208139)


--- trunk/Source/WebCore/ChangeLog	2016-10-31 05:22:42 UTC (rev 208138)
+++ trunk/Source/WebCore/ChangeLog	2016-10-31 07:53:30 UTC (rev 208139)
@@ -1,3 +1,13 @@
+2016-10-28  Philippe Normand  <[email protected]>
+
+        [OpenWebRTC] Initialize library one time only
+        https://bugs.webkit.org/show_bug.cgi?id=164118
+
+        Reviewed by Darin Adler.
+
+        * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
+        (WebCore::initializeOpenWebRTC): Prevent multiple initialisations of the library.
+
 2016-10-30  Brent Fulgham  <[email protected]>
 
         Unreviewed fix: Correct ChangeLog after my bad merge.

Modified: trunk/Source/WebCore/platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp (208138 => 208139)


--- trunk/Source/WebCore/platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp	2016-10-31 05:22:42 UTC (rev 208138)
+++ trunk/Source/WebCore/platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp	2016-10-31 07:53:30 UTC (rev 208139)
@@ -44,7 +44,12 @@
 
 void initializeOpenWebRTC()
 {
+    static bool isInitialized = false;
+    if (isInitialized)
+        return;
+
     owr_init(g_main_context_default());
+    isInitialized = true;
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to